diff options
author | Bernhard Walle <walle@corscience.de> | 2010-09-27 12:55:16 +0200 |
---|---|---|
committer | Ben Dooks <ben-linux@fluff.org> | 2010-09-28 00:21:16 +0200 |
commit | cc33e54290ed845904dac4b047934207738f0205 (patch) | |
tree | 439d14aca85918a9aef8c371513c249d331771ac /drivers/i2c | |
parent | i2c-omap: Make sure i2c bus is free before setting it to idle (diff) | |
download | linux-cc33e54290ed845904dac4b047934207738f0205.tar.xz linux-cc33e54290ed845904dac4b047934207738f0205.zip |
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>
Diffstat (limited to 'drivers/i2c')
-rw-r--r-- | drivers/i2c/busses/i2c-octeon.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/i2c/busses/i2c-octeon.c b/drivers/i2c/busses/i2c-octeon.c index 0e9f85d0a835..56dbe54e8811 100644 --- a/drivers/i2c/busses/i2c-octeon.c +++ b/drivers/i2c/busses/i2c-octeon.c @@ -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; |