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 <monamagarwal123@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
                                        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.
                if (ret < 0) {
                        dev_err(&chip->client->dev,
                                "taos_chip_on failed on reg %d.\n", i);
-                       return -1;
+                       return ret;
                }
        }
 
                                        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;