summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSachin Kamat <sachin.kamat@linaro.org>2013-09-11 11:32:00 +0200
committerJonathan Cameron <jic23@kernel.org>2013-09-18 20:43:33 +0200
commit40e23ced937aab63b6191ce0e8083bfe09847423 (patch)
tree9a825f8eacdfc6233badf051bc00f45f94d7d350
parentstaging:iio:hmc5843: Fix measurement conversion (diff)
downloadlinux-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.c2
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)