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:44:50 +0000 (19:44 +0100)
commite31bc4df038b8b3ce07b2039ec7db64b97a925a3
treeda2734d0d87cd574265d95f3390700a81ce233f5
parent9b3e959d46e37597fd2b9c68e3133a5b49d6da6c
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