From: Bernhard Walle Date: Mon, 27 Sep 2010 10:55:16 +0000 (+0200) Subject: i2c-octeon: Return -ETIMEDOUT in octeon_i2c_wait() on timeout X-Git-Tag: v2.6.36-rc7~24^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cc33e54290ed845904dac4b047934207738f0205;p=profile%2Fivi%2Fkernel-adaptation-intel-automotive.git 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 Acked-by: David Daney Signed-off-by: Ben Dooks --- diff --git a/drivers/i2c/busses/i2c-octeon.c b/drivers/i2c/busses/i2c-octeon.c index 0e9f85d..56dbe54 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;