提交 2d2da9fc 编写于 作者: W Wei Yongjun 提交者: Jonathan Cameron

iio: adc: twl6030-gpadc: fix error return code in twl6030_gpadc_read_raw()

Fix to return -EINTR in the error handling case instead
of 0 (ret is assigned after goto, which has no effect),
as done elsewhere in this function.
Signed-off-by: NWei Yongjun <yongjun_wei@trendmicro.com.cn>
Reported-by: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NJonathan Cameron <jic23@kernel.org>
上级 0eab65c6
......@@ -537,8 +537,8 @@ static int twl6030_gpadc_read_raw(struct iio_dev *indio_dev,
ret = -ETIMEDOUT;
goto err;
} else if (timeout < 0) {
goto err;
ret = -EINTR;
goto err;
}
switch (mask) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册