diff options
author | Brian Masney <masneyb@onstation.org> | 2016-10-28 06:00:14 -0400 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2016-11-01 18:50:04 +0000 |
commit | 20d823afff200fa131eb0dfaf6d33d8863ba8acf (patch) | |
tree | a408318409e03a6e06e4dfa851db62ad57898deb /drivers | |
parent | 9d5f36d2419e488dfa6ba38e4cfc1e90f65a4cff (diff) |
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 <masneyb@onstation.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/iio/light/tsl2583.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/iio/light/tsl2583.c b/drivers/staging/iio/light/tsl2583.c index 35c1696a71c5..47fd373e1734 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, |