i2c: spacemit: ensure bus release check runs when wait_bus_idle() fails
spacemit_i2c_wait_bus_idle() only returns 0 on success or a negative error code on failure. Since 'ret' can never be positive, the final 'else' branch was unreachable, and spacemit_i2c_check_bus_release() was never called. This commit guarantees we attempt to release the bus whenever waiting for an idle bus fails. Fixes: 5ea55847 ("i2c: spacemit: add support for SpacemiT K1 SoC") Reviewed-by:Aurelien Jarno <aurelien@aurel32.net> Signed-off-by:
Troy Mitchell <troy.mitchell@linux.spacemit.com> Signed-off-by:
Wolfram Sang <wsa+renesas@sang-engineering.com>
Loading
Please sign in to comment