git.openpandora.org
/
pandora-u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b688756
)
cmd: i2c: fix coverity issue
author
Heiko Schocher
<hs@denx.de>
Mon, 4 Aug 2025 09:43:29 +0000
(11:43 +0200)
committer
Heiko Schocher
<hs@denx.de>
Wed, 6 Aug 2025 05:49:13 +0000
(07:49 +0200)
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>
cmd/i2c.c
patch
|
blob
|
history
diff --git
a/cmd/i2c.c
b/cmd/i2c.c
index
f0aae93
..
e021067
100644
(file)
--- 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;