mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-06-02 09:46:37 +03:00
i2c: rcar_iic: Do not use unitialised variable
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>
This commit is contained in:
committed by
Heiko Schocher
parent
007610da2c
commit
b68875656c
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user