mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
iio: light: ltr501: Power down chip if request irq fails
In case devm_request_threaded_irq() failed, we were leaving the chip
powered instead of powering it down again. Power down the chip switching
ALS and PS modes to standby.
Fixes: 7ac702b314 ("iio: ltr501: Add interrupt support")
Cc: stable@vger.kernel.org
Acked-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Esben Haabendal <esben@geanix.com>
Signed-off-by: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com>
This commit is contained in:
parent
b433990457
commit
8a9bcd587d
|
|
@ -1538,7 +1538,7 @@ static int ltr501_probe(struct i2c_client *client)
|
|||
"ltr501_thresh_event",
|
||||
indio_dev);
|
||||
if (ret)
|
||||
return ret;
|
||||
goto powerdown_on_error;
|
||||
} else {
|
||||
indio_dev->info = data->chip_info->info_no_irq;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user