aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSachin Kamat <sachin.kamat@linaro.org>2013-09-11 05:32:00 -0400
committerJonathan Cameron <jic23@kernel.org>2013-09-18 14:43:33 -0400
commit40e23ced937aab63b6191ce0e8083bfe09847423 (patch)
tree9a825f8eacdfc6233badf051bc00f45f94d7d350
parent575a6c90c190efabc829a8a9109f5036edaf1a82 (diff)
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)
299 if (ret) 299 if (ret)
300 iio_device_free(indio_dev); 300 iio_device_free(indio_dev);
301 301
302 return 0; 302 return ret;
303} 303}
304 304
305static int ade7854_spi_remove(struct spi_device *spi) 305static int ade7854_spi_remove(struct spi_device *spi)