kernel_samsung_a53x/drivers/iio/light
Javier Carrasco 923da71956 iio: light: veml6030: fix IIO device retrieval from embedded device
commit c7c44e57750c31de43906d97813273fdffcf7d02 upstream.

The dev pointer that is received as an argument in the
in_illuminance_period_available_show function references the device
embedded in the IIO device, not in the i2c client.

dev_to_iio_dev() must be used to accessthe right data. The current
implementation leads to a segmentation fault on every attempt to read
the attribute because indio_dev gets a NULL assignment.

This bug has been present since the first appearance of the driver,
apparently since the last version (V6) before getting applied. A
constant attribute was used until then, and the last modifications might
have not been tested again.

Cc: stable@vger.kernel.org
Fixes: 7b779f573c48 ("iio: light: add driver for veml6030 ambient light sensor")
Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Link: https://patch.msgid.link/20240913-veml6035-v1-3-0b09c0c90418@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-11-23 23:21:56 +01:00
..
acpi-als.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
adjd_s311.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
adux1020.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
al3010.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
al3320a.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
apds9300.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
apds9960.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
as73211.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bh1750.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bh1780.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cm3232.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cm3323.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cm3605.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cm32181.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cm36651.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cros_ec_light_prox.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
gp2ap002.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
gp2ap020a00f.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-sensor-als.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-sensor-prox.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
iqs621-als.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
isl29018.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
isl29028.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
isl29125.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
jsa1212.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
lm3533-als.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ltr501.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
lv0104cs.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
max44000.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
max44009.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
noa1305.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
opt3001.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pa12203001.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rpr0521.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
si1133.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
si1145.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
st_uvis25.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
st_uvis25_core.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
st_uvis25_i2c.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
st_uvis25_spi.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
stk3310.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tcs3414.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tcs3472.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tsl2563.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tsl2583.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tsl2772.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tsl4531.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
us5182d.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vcnl4000.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vcnl4035.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
veml6030.c iio: light: veml6030: fix IIO device retrieval from embedded device 2024-11-23 23:21:56 +01:00
veml6070.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vl6180.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
zopt2201.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00