Skip to content

Commit

Permalink
i2c-octeon: Return -ETIMEDOUT in octeon_i2c_wait() on timeout
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Bernhard Walle authored and Ben Dooks committed Sep 27, 2010
1 parent 5c64eb2 commit cc33e54
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/i2c/busses/i2c-octeon.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit cc33e54

Please sign in to comment.