staging: iio: adc: ad7280a: handle error from __ad7280_read32()
authorSlawomir Stepien <sst@poczta.fm>
Sat, 20 Oct 2018 21:04:11 +0000 (23:04 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 12 Feb 2019 18:46:56 +0000 (19:46 +0100)
commit2ca14d0d2576f668df36dac9401ad8d8293dde94
treec093c4198f5808098ed84c0fcf16ffd1e1f4db1c
parenta8b9f4f627c3057e67d7dd8cf82c81d6eb1ccde1
staging: iio: adc: ad7280a: handle error from __ad7280_read32()

[ Upstream commit 0559ef7fde67bc6c83c6eb6329dbd6649528263e ]

Inside __ad7280_read32(), the spi_sync_transfer() can fail with negative
error code. This change will ensure that this error is being passed up
in the call stack, so it can be handled.

Signed-off-by: Slawomir Stepien <sst@poczta.fm>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/staging/iio/adc/ad7280a.c