i2c: isch: Add missed 'else'
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: 5bc1200852c3 ("i2c: Add Intel SCH SMBus support") Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: <stable@vger.kernel.org> # v2.6.27+ Signed-off-by: Andi Shyti <andi.shyti@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
e1c2b064e3
commit
2beda8e3ef
1 changed files with 1 additions and 2 deletions
|
@ -99,8 +99,7 @@ static int sch_transaction(void)
|
||||||
if (retries > MAX_RETRIES) {
|
if (retries > MAX_RETRIES) {
|
||||||
dev_err(&sch_adapter.dev, "SMBus Timeout!\n");
|
dev_err(&sch_adapter.dev, "SMBus Timeout!\n");
|
||||||
result = -ETIMEDOUT;
|
result = -ETIMEDOUT;
|
||||||
}
|
} else if (temp & 0x04) {
|
||||||
if (temp & 0x04) {
|
|
||||||
result = -EIO;
|
result = -EIO;
|
||||||
dev_dbg(&sch_adapter.dev, "Bus collision! SMBus may be "
|
dev_dbg(&sch_adapter.dev, "Bus collision! SMBus may be "
|
||||||
"locked until next hard reset. (sorry!)\n");
|
"locked until next hard reset. (sorry!)\n");
|
||||||
|
|
Loading…
Add table
Reference in a new issue