From: Andy Shevchenko Date: Wed, 11 Sep 2024 15:39:14 +0000 (+0300) Subject: i2c: isch: Add missed 'else' X-Git-Tag: v6.12-rc1~122^2^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1db4da55070d6a2754efeb3743f5312fc32f5961;p=thirdparty%2Fkernel%2Flinux.git i2c: isch: Add missed 'else' In accordance with the existing comment and code analysis it is quite likely that there is a missed 'else' when adapter times out. Add it. Fixes: 5bc1200852c3 ("i2c: Add Intel SCH SMBus support") Signed-off-by: Andy Shevchenko Cc: # v2.6.27+ Signed-off-by: Andi Shyti --- diff --git a/drivers/i2c/busses/i2c-isch.c b/drivers/i2c/busses/i2c-isch.c index 33dbc19d3848d..f59158489ad9f 100644 --- a/drivers/i2c/busses/i2c-isch.c +++ b/drivers/i2c/busses/i2c-isch.c @@ -99,8 +99,7 @@ static int sch_transaction(void) if (retries > MAX_RETRIES) { dev_err(&sch_adapter.dev, "SMBus Timeout!\n"); result = -ETIMEDOUT; - } - if (temp & 0x04) { + } else if (temp & 0x04) { result = -EIO; dev_dbg(&sch_adapter.dev, "Bus collision! SMBus may be " "locked until next hard reset. (sorry!)\n");