mirror of
https://github.com/torvalds/linux.git
synced 2026-05-31 02:24:24 +02:00
iio: dac: ad5770r: fix error return in ad5770r_read_raw()
Return the error code from regmap_bulk_read() instead of 0 so
that I/O failures are properly propagated.
Fixes: cbbb819837 ("iio: dac: ad5770r: Add AD5770R support")
Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
This commit is contained in:
parent
4f51e6c0ba
commit
c354521708
|
|
@ -322,7 +322,7 @@ static int ad5770r_read_raw(struct iio_dev *indio_dev,
|
|||
chan->address,
|
||||
st->transf_buf, 2);
|
||||
if (ret)
|
||||
return 0;
|
||||
return ret;
|
||||
|
||||
buf16 = get_unaligned_le16(st->transf_buf);
|
||||
*val = buf16 >> 2;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user