diff options
author | Sachin Kamat <sachin.kamat@linaro.org> | 2013-09-11 11:32:00 +0200 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2013-09-18 20:43:33 +0200 |
commit | 40e23ced937aab63b6191ce0e8083bfe09847423 (patch) | |
tree | 9a825f8eacdfc6233badf051bc00f45f94d7d350 | |
parent | staging:iio:hmc5843: Fix measurement conversion (diff) | |
download | linux-40e23ced937aab63b6191ce0e8083bfe09847423.tar.xz linux-40e23ced937aab63b6191ce0e8083bfe09847423.zip |
staging: iio: ade7854-spi: Fix return value
ade7854_probe can fail. Return the value obtained from it
instead of 0 (success).
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Barry Song <21cnbao@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
-rw-r--r-- | drivers/staging/iio/meter/ade7854-spi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/iio/meter/ade7854-spi.c b/drivers/staging/iio/meter/ade7854-spi.c index a802cf2491d6..4c6d2041260b 100644 --- a/drivers/staging/iio/meter/ade7854-spi.c +++ b/drivers/staging/iio/meter/ade7854-spi.c @@ -299,7 +299,7 @@ static int ade7854_spi_probe(struct spi_device *spi) if (ret) iio_device_free(indio_dev); - return 0; + return ret; } static int ade7854_spi_remove(struct spi_device *spi) |