Skip to content

Commit 1db4da5

Browse files
andy-shevAndi Shyti
authored andcommitted
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: 5bc1200 ("i2c: Add Intel SCH SMBus support") Signed-off-by: Andy Shevchenko <[email protected]> Cc: <[email protected]> # v2.6.27+ Signed-off-by: Andi Shyti <[email protected]>
1 parent 1d4a1ad commit 1db4da5

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/i2c/busses/i2c-isch.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,7 @@ static int sch_transaction(void)
9999
if (retries > MAX_RETRIES) {
100100
dev_err(&sch_adapter.dev, "SMBus Timeout!\n");
101101
result = -ETIMEDOUT;
102-
}
103-
if (temp & 0x04) {
102+
} else if (temp & 0x04) {
104103
result = -EIO;
105104
dev_dbg(&sch_adapter.dev, "Bus collision! SMBus may be "
106105
"locked until next hard reset. (sorry!)\n");

0 commit comments

Comments
 (0)