From b1463957d1138955c8b63a76aaa6abbaf5b5aa81 Mon Sep 17 00:00:00 2001 From: Heiko Schocher Date: Mon, 4 Aug 2025 11:43:29 +0200 Subject: [PATCH] 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 --- cmd/i2c.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; -- 2.47.2