Browse Source

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>
Sachin Kamat 11 years ago
parent
commit
40e23ced93
1 changed files with 1 additions and 1 deletions
  1. 1 1
      drivers/staging/iio/meter/ade7854-spi.c

+ 1 - 1
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)