staging: iio: adc: ad7280a: power down the device on error in probe
authorSlawomir Stepien <sst@poczta.fm>
Sun, 11 Nov 2018 15:59:10 +0000 (16:59 +0100)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Fri, 16 Nov 2018 18:32:35 +0000 (18:32 +0000)
commit9829f9e5415c17824f23aa6e1573829256c8c298
tree027b4a4bba40b4a531e8584d6e7e153bee65ee71
parent1d6b36752bb31c4407ec8e995b361ffdc15fb86d
staging: iio: adc: ad7280a: power down the device on error in probe

Power down the device if anything goes wrong after the SPI has been
setup correctly in the probe function.

Existing code that toggles the AD7280A_CTRL_LB_SWRST bit inside
ad7280_chain_setup function is responsible for powering up the device.

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