mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-05 02:19:51 +00:00
i2c-octeon: Return -ETIMEDOUT in octeon_i2c_wait() on timeout
It doesn't make sense to set result to -ETIMEDOUT but return 0 (success) afterwards. Since there's code in octeon_i2c_start() to handle the error, it should be called. Signed-off-by: Bernhard Walle <walle@corscience.de> Acked-by: David Daney <ddaney@caviumnetworks.com> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
This commit is contained in:
parent
5c64eb26ed
commit
cc33e54290
1 changed files with 1 additions and 1 deletions
|
@ -218,7 +218,7 @@ static int octeon_i2c_wait(struct octeon_i2c *i2c)
|
|||
return result;
|
||||
} else if (result == 0) {
|
||||
dev_dbg(i2c->dev, "%s: timeout\n", __func__);
|
||||
result = -ETIMEDOUT;
|
||||
return -ETIMEDOUT;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
Loading…
Reference in a new issue