From: Sachin Kamat Date: Wed, 11 Sep 2013 09:32:00 +0000 (+0100) Subject: staging: iio: ade7854-spi: Fix return value X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=40e23ced937aab63b6191ce0e8083bfe09847423;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git 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 Cc: Barry Song <21cnbao@gmail.com> Signed-off-by: Jonathan Cameron --- 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)