linux-stable/drivers/iio/light
Zheyu Ma 06674fc7c0 iio: light: isl29028: Fix the warning in isl29028_remove()
The driver use the non-managed form of the register function in
isl29028_remove(). To keep the release order as mirroring the ordering
in probe, the driver should use non-managed form in probe, too.

The following log reveals it:

[   32.374955] isl29028 0-0010: remove
[   32.376861] general protection fault, probably for non-canonical address 0xdffffc0000000006: 0000 [#1] PREEMPT SMP KASAN PTI
[   32.377676] KASAN: null-ptr-deref in range [0x0000000000000030-0x0000000000000037]
[   32.379432] RIP: 0010:kernfs_find_and_get_ns+0x28/0xe0
[   32.385461] Call Trace:
[   32.385807]  sysfs_unmerge_group+0x59/0x110
[   32.386110]  dpm_sysfs_remove+0x58/0xc0
[   32.386391]  device_del+0x296/0xe50
[   32.386959]  cdev_device_del+0x1d/0xd0
[   32.387231]  devm_iio_device_unreg+0x27/0xb0
[   32.387542]  devres_release_group+0x319/0x3d0
[   32.388162]  i2c_device_remove+0x93/0x1f0

Fixes: 2db5054ac2 ("staging: iio: isl29028: add runtime power management support")
Signed-off-by: Zheyu Ma <zheyuma97@gmail.com>
Link: https://lore.kernel.org/r/20220717004241.2281028-1-zheyuma97@gmail.com
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2022-07-19 09:42:11 +01:00
..
acpi-als.c iio: core: move @id from struct iio_dev to struct iio_dev_opaque 2021-05-17 13:49:13 +01:00
adjd_s311.c iio: light: adjd_s311: convert probe to device-managed functions 2021-07-17 18:44:18 +01:00
adux1020.c
al3010.c iio: light: al3010: Switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() 2022-07-18 18:48:18 +01:00
al3320a.c iio: light: al3320a: Switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() 2022-07-18 18:48:18 +01:00
apds9300.c iio:light:apds9300: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() etc 2022-02-18 11:45:29 +00:00
apds9960.c iio: core: Simplify the registration of kfifo buffers 2022-04-10 16:25:46 +01:00
as73211.c iio: light: as73211: Switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() 2022-07-18 18:48:18 +01:00
bh1750.c iio: light: bh1750: Switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() 2022-07-18 18:48:18 +01:00
bh1780.c iio:light:bh1780: Remove duplicated error reporting in .remove() 2022-06-11 14:35:25 +01:00
cm3232.c iio:light:cm3232: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() etc 2022-02-18 11:45:29 +00:00
cm3323.c iio: light: cm3323: Add of_device_id table 2021-08-08 15:25:40 +01:00
cm3605.c iio: light: cm3605: Switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() 2022-07-18 18:48:18 +01:00
cm32181.c iio: light: cm32181: Add PM support 2022-07-07 17:50:04 +01:00
cm36651.c iio: light: cm36651: Make use of the helper function dev_err_probe() 2021-10-19 08:30:44 +01:00
cros_ec_light_prox.c iio: cros: Register FIFO callback after sensor is registered 2022-07-18 18:29:13 +01:00
gp2ap002.c iio: light: gp2ap002: Switch to DEFINE_RUNTIME_DEV_PM_OPS and pm_ptr() 2022-07-18 18:48:19 +01:00
gp2ap020a00f.c iio: gp2ap020a00f: Remove no-op trigger ops 2021-11-17 17:51:38 +00:00
hid-sensor-als.c iio: hid-sensors: bind IIO channels alloc to device object 2021-07-13 18:21:53 +01:00
hid-sensor-prox.c iio: hid-sensors: bind IIO channels alloc to device object 2021-07-13 18:21:53 +01:00
iqs621-als.c
isl29018.c iio:light:isl29018: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() 2022-02-18 11:45:29 +00:00
isl29028.c iio: light: isl29028: Fix the warning in isl29028_remove() 2022-07-19 09:42:11 +01:00
isl29125.c iio:light:isl29125: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() etc 2022-02-18 11:45:29 +00:00
jsa1212.c iio:light:jsa1212: Remove duplicated error reporting in .remove() 2022-06-11 14:35:25 +01:00
Kconfig iio: light: cm3605: Drop dependency on OF 2022-04-28 19:22:55 +01:00
lm3533-als.c iio: lm3533: Use sysfs_emit() 2022-01-23 18:03:36 +00:00
ltr501.c iio:light:ltr501: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() etc 2022-02-18 11:45:29 +00:00
lv0104cs.c
Makefile iio: light: Added AMS tsl2591 driver implementation 2021-05-17 13:49:06 +01:00
max44000.c iio: light: max44000: use device-managed functions in probe 2021-10-17 11:05:54 +01:00
max44009.c
noa1305.c iio: light: noa1305: Make use of the helper function dev_err_probe() 2021-10-19 08:30:44 +01:00
opt3001.c iio:light:opt3001: Remove duplicated error reporting in .remove() 2022-06-11 14:35:25 +01:00
pa12203001.c iio:light:pa12203001: Improve error reporting for problems during .remove() 2022-06-11 14:35:27 +01:00
rpr0521.c iio:light:rpr0521: Switch from CONFIG_PM guards to pm_ptr() etc 2022-02-21 19:33:04 +00:00
si1133.c iio: light: si1133: Drop remaining uses of %hhx format string. 2021-06-09 18:31:03 +01:00
si1145.c iio: light: si1145: remove redundant continue statement 2021-07-19 09:52:00 +01:00
st_uvis25.h iio:light:st_uvis25: Fix timestamp alignment and prevent data leak. 2020-12-03 19:40:27 +00:00
st_uvis25_core.c iio:light:st_uvis25: Move exports to IIO_UVIS25 namespace 2022-02-18 11:42:27 +00:00
st_uvis25_i2c.c iio:light:st_uvis25: Move exports to IIO_UVIS25 namespace 2022-02-18 11:42:27 +00:00
st_uvis25_spi.c iio:light:st_uvis25: Move exports to IIO_UVIS25 namespace 2022-02-18 11:42:27 +00:00
stk3310.c iio:light:stk3310: Remove duplicated error reporting in .remove() 2022-06-11 14:35:25 +01:00
tcs3414.c iio:light:tcs3414: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() etc 2022-02-18 11:45:30 +00:00
tcs3472.c iio:light:tcs3472: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() etc 2022-02-18 11:45:30 +00:00
tsl2563.c iio:light:tsl2563: Replace cancel_delayed_work() with cancel_delayed_work_sync(). 2022-06-18 14:56:25 +01:00
tsl2583.c iio: light: tsl2583: Use DEFINE_RUNTIME_DEV_PM_OPS and pm_ptr() 2022-07-18 18:48:19 +01:00
tsl2591.c iio: light: tsl2591: Use DEFINE_RUNTIME_DEV_PM_OPS() and pm_ptr() 2022-07-18 18:48:19 +01:00
tsl2772.c iio: light: tsl2772: Make use of device properties 2022-04-28 19:22:55 +01:00
tsl4531.c iio:light:tsl4531: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() etc 2022-02-18 11:45:30 +00:00
us5182d.c iio: light: us5182: Switch from CONFIG_PM guards to pm_ptr() etc 2022-07-18 18:48:18 +01:00
vcnl4000.c iio: light: vcnl4000: Use DEFINE_RUNTIME_DEV_PM_OPS() and pm_ptr() macros 2022-07-18 18:48:19 +01:00
vcnl4035.c iio: light: vcnl4035: Use DEFINE_RUNTIME_DEV_PM_OPS() and pm_ptr() macros 2022-07-18 18:48:19 +01:00
veml6030.c iio: light: veml6030: Use DEFINE_RUNTIME_DEV_PM_OPS() and pm_ptr() macros 2022-07-18 18:48:19 +01:00
veml6070.c
vl6180.c iio: vl6180: Use DIV_ROUND_CLOSEST() instead of open-coding it 2021-01-09 21:52:45 +00:00
zopt2201.c