]> git.ipfire.org Git - thirdparty/u-boot.git/commit
i2c: rcar_iic: Do not use unitialised variable
authorAndrew Goodbody <andrew.goodbody@linaro.org>
Mon, 28 Jul 2025 15:04:43 +0000 (16:04 +0100)
committerHeiko Schocher <hs@denx.de>
Wed, 6 Aug 2025 05:48:40 +0000 (07:48 +0200)
commitb68875656c3bad36c4d5b9f44b7689e3e1864e09
tree18de89be59c7aba0f3001d3ea335bfedeccfb8b3
parent007610da2cca405ea7739fc120d90085be4b6ac2
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>
drivers/i2c/rcar_iic.c