From: Brian Masney Date: Fri, 28 Oct 2016 10:00:14 +0000 (-0400) Subject: staging: iio: tsl2583: return proper error code instead of -1 X-Git-Tag: v4.14-rc1~1919^2~367^2~24 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=20d823afff200fa131eb0dfaf6d33d8863ba8acf;p=platform%2Fkernel%2Flinux-rpi.git staging: iio: tsl2583: return proper error code instead of -1 taos_als_calibrate() has a code path where -1 is returned. This patch changes the code so that a proper error code is returned. Signed-off-by: Brian Masney Signed-off-by: Jonathan Cameron --- diff --git a/drivers/staging/iio/light/tsl2583.c b/drivers/staging/iio/light/tsl2583.c index 35c1696..47fd373 100644 --- a/drivers/staging/iio/light/tsl2583.c +++ b/drivers/staging/iio/light/tsl2583.c @@ -373,7 +373,7 @@ static int taos_als_calibrate(struct iio_dev *indio_dev) != (TSL258X_CNTL_ADC_ENBL | TSL258X_CNTL_PWR_ON)) { dev_err(&chip->client->dev, "taos_als_calibrate failed: device not powered on with ADC enabled\n"); - return -1; + return -EINVAL; } ret = i2c_smbus_write_byte(chip->client,