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 <[email protected]>
Acked-by: David Daney <[email protected]>
Signed-off-by: Ben Dooks <[email protected]>
This commit is contained in:
Bernhard Walle 2010-09-27 12:55:16 +02:00 • committed by Ben Dooks
commit cc33e54290

View file

@ -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;