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>
Wed, 20 Feb 2019 09:08:55 +0000 (10:08 +0100)
commita3d19b2bb4300515ef6c884482635e0f835339ba
treedb82ec0900abd9ac0d0cf92af7b9de6dffcc170b
parent49ab1e524f6a1fd0b42aefc827d57413e5332e92
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