From: Monam Agarwal Date: Sun, 9 Mar 2014 05:28:40 +0000 (+0530) Subject: Staging: iio/light: Fix return values in tsl2583.c X-Git-Tag: v5.15~18197^2~170 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=67fc0120e519b7b6937899b038cd4044d3ed573b;p=platform%2Fkernel%2Flinux-starfive.git Staging: iio/light: Fix return values in tsl2583.c This patch fixes following smatch warnings: /drivers/staging/iio/light/tsl2583.c:436 taos_chip_on() info: why not propagate 'ret' from i2c_smbus_write_byte_data() instead of (-1)? /drivers/staging/iio/light/tsl2583.c:448 taos_chip_on() info: why not propagate 'ret' from i2c_smbus_write_byte_data() instead of (-1)? /drivers/staging/iio/light/tsl2583.c:461 taos_chip_on() info: why not propagate 'ret' from i2c_smbus_write_byte_data() instead of (-1)? Signed-off-by: Monam Agarwal Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/iio/light/tsl2583.c b/drivers/staging/iio/light/tsl2583.c index f8c6595..0a60def 100644 --- a/drivers/staging/iio/light/tsl2583.c +++ b/drivers/staging/iio/light/tsl2583.c @@ -433,7 +433,7 @@ static int taos_chip_on(struct iio_dev *indio_dev) TSL258X_CMD_REG | TSL258X_CNTRL, utmp); if (ret < 0) { dev_err(&chip->client->dev, "taos_chip_on failed on CNTRL reg.\n"); - return -1; + return ret; } /* Use the following shadow copy for our delay before enabling ADC. @@ -445,7 +445,7 @@ static int taos_chip_on(struct iio_dev *indio_dev) if (ret < 0) { dev_err(&chip->client->dev, "taos_chip_on failed on reg %d.\n", i); - return -1; + return ret; } } @@ -458,7 +458,7 @@ static int taos_chip_on(struct iio_dev *indio_dev) utmp); if (ret < 0) { dev_err(&chip->client->dev, "taos_chip_on failed on 2nd CTRL reg.\n"); - return -1; + return ret; } chip->taos_chip_status = TSL258X_CHIP_WORKING;