summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorHeiko Schocher <[email protected]>2025-08-04 11:43:29 +0200
committerHeiko Schocher <[email protected]>2025-08-06 07:49:13 +0200
commitb1463957d1138955c8b63a76aaa6abbaf5b5aa81 (patch)
tree4fcb12c91fdf6d5f7c403c37cf709f2246c7db45 /cmd
parentb68875656c3bad36c4d5b9f44b7689e3e1864e09 (diff)
cmd: i2c: fix coverity issue
coverity scan reported issue: ** CID 583415: Integer handling issues (INTEGER_OVERFLOW) /cmd/i2c.c: 369 in do_i2c_write() change the length variable into type int. Signed-off-by: Heiko Schocher <[email protected]>
Diffstat (limited to 'cmd')
-rw-r--r--cmd/i2c.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/cmd/i2c.c b/cmd/i2c.c
index f0aae93073f..e021067e68a 100644
--- a/cmd/i2c.c
+++ b/cmd/i2c.c
@@ -299,7 +299,8 @@ static int do_i2c_write(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[])
{
uint chip;
- uint devaddr, length;
+ uint devaddr;
+ int length;
int alen;
u_char *memaddr;
int ret;