提交 cc33e542 编写于 作者: B Bernhard Walle 提交者: Ben Dooks

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: NBernhard Walle <walle@corscience.de>
Acked-by: NDavid Daney <ddaney@caviumnetworks.com>
Signed-off-by: NBen Dooks <ben-linux@fluff.org>
上级 5c64eb26
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册