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 <hs@denx.de>
This commit is contained in:
Heiko Schocher
2025-08-04 11:43:29 +02:00
parent b68875656c
commit b1463957d1

View File

@@ -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;