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:45:56 +0000 (19:45 +0100)
commitbd39c9485d6aa580d8059716ba43b6c3493c8a83
tree8a445bc320874d2902a4bc35d194b19e9cd8bc69
parent8df7378b0de4f64c155f4a2a93005d680fc6828c
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