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:
007610d
)
i2c: rcar_iic: Do not use unitialised variable
author
Andrew Goodbody
<andrew.goodbody@linaro.org>
Mon, 28 Jul 2025 15:04:43 +0000
(16:04 +0100)
committer
Heiko Schocher
<hs@denx.de>
Wed, 6 Aug 2025 05:48:40 +0000
(07:48 +0200)
In rcar_iic_xfer if nmsgs == 0 the ret will not be assigned to. As ret
will always be 0 if the for loop is entered, may as well just return 0.
This issue was found by Smatch.
Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
Reviewed-by: Heiko Schocher <hs@denx.de>
drivers/i2c/rcar_iic.c
patch
|
blob
|
history
diff --git
a/drivers/i2c/rcar_iic.c
b/drivers/i2c/rcar_iic.c
index
e019d06
..
42d575e
100644
(file)
--- a/
drivers/i2c/rcar_iic.c
+++ b/
drivers/i2c/rcar_iic.c
@@
-191,7
+191,7
@@
static int rcar_iic_xfer(struct udevice *dev, struct i2c_msg *msg, int nmsgs)
return -EREMOTEIO;
}
- return
ret
;
+ return
0
;
}
static int rcar_iic_set_speed(struct udevice *dev, uint speed)