These variables need to be int for the error handling to work.
Fixes:
2335f0d7c790 ("iio: light: Added AMS tsl2591 driver implementation")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/YJ52r1XZ44myD9Xx@mwanda
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
}
}
-static u8 tsl2591_multiplier_to_gain(const u32 multiplier)
+static int tsl2591_multiplier_to_gain(const u32 multiplier)
{
switch (multiplier) {
case TSL2591_CTRL_ALS_LOW_GAIN_MULTIPLIER:
int val, int val2, long mask)
{
struct tsl2591_chip *chip = iio_priv(indio_dev);
- u32 int_time;
- u8 gain;
+ int int_time;
+ int gain;
int ret;
mutex_lock(&chip->als_mutex);