Commit fe629818 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Wen Zhiwei
Browse files

i2c: isch: Add missed 'else'

stable inclusion
from stable-v6.6.54
commit d669e782900775c1ff3434d600c6028198d093f4
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/IAZ3K2

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=d669e782900775c1ff3434d600c6028198d093f4



--------------------------------

commit 1db4da55070d6a2754efeb3743f5312fc32f5961 upstream.

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: 5bc12008 ("i2c: Add Intel SCH SMBus support")
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: <stable@vger.kernel.org> # v2.6.27+
Signed-off-by: default avatarAndi Shyti <andi.shyti@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarWen Zhiwei <wenzhiwei@kylinos.cn>
parent 358ae90b
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -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");