Commit 41d6f90e authored by Troy Mitchell's avatar Troy Mitchell Committed by Wolfram Sang
Browse files

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: default avatarAurelien Jarno <aurelien@aurel32.net>
Signed-off-by: default avatarTroy Mitchell <troy.mitchell@linux.spacemit.com>
Signed-off-by: default avatarWolfram Sang <wsa+renesas@sang-engineering.com>
parent b4921836
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment