staging: iio: ade7854-spi: Fix return value
authorSachin Kamat <sachin.kamat@linaro.org>
Wed, 11 Sep 2013 09:32:00 +0000 (10:32 +0100)
committerJonathan Cameron <jic23@kernel.org>
Wed, 18 Sep 2013 18:43:33 +0000 (19:43 +0100)
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>
drivers/staging/iio/meter/ade7854-spi.c

index a802cf2491d61a6d55f95c6e6825792905fa118a..4c6d2041260bed259f7cba174c64ceb9a9c1a3f8 100644 (file)
@@ -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)