kernel_samsung_a53x/drivers/iio/adc
Marcelo Schmitt ba99e8e72e iio: adc: ad7091r: Pass iio_dev to event handler
commit a25a7df518fc71b1ba981d691e9322e645d2689c upstream.

Previous version of ad7091r event handler received the ADC state pointer
and retrieved the iio device from driver data field with dev_get_drvdata().
However, no driver data have ever been set, which led to null pointer
dereference when running the event handler.

Pass the iio device to the event handler and retrieve the ADC state struct
from it so we avoid the null pointer dereference and save the driver from
filling the driver data field.

Fixes: ca69300173b6 ("iio: adc: Add support for AD7091R5 ADC")
Signed-off-by: Marcelo Schmitt <marcelo.schmitt@analog.com>
Link: https://lore.kernel.org/r/5024b764107463de9578d5b3b0a3d5678e307b1a.1702746240.git.marcelo.schmitt1@gmail.com
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-11-18 12:12:48 +01:00
..
ab8500-gpadc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ad799x.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ad7091r-base.c iio: adc: ad7091r: Pass iio_dev to event handler 2024-11-18 12:12:48 +01:00
ad7091r-base.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ad7091r5.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ad7124.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ad7192.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ad7266.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ad7291.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ad7292.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ad7298.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ad7476.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ad7606.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ad7606.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ad7606_par.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ad7606_spi.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ad7766.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ad7768-1.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ad7780.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ad7791.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ad7793.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ad7887.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ad7923.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ad7949.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ad9467.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ad_sigma_delta.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
adi-axi-adc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
aspeed_adc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
at91-sama5d2_adc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
at91_adc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
axp20x_adc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
axp288_adc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bcm_iproc_adc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
berlin2-adc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cc10001_adc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cpcap-adc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
da9150-gpadc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dln2-adc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
envelope-detector.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ep93xx_adc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
exynos_adc.c iio: exynos-adc: request second interupt only when touchscreen mode is used 2024-11-18 10:58:30 +01:00
fsl-imx25-gcq.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hi8435.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hx711.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
imx7d_adc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ina2xx-adc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ingenic-adc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
intel_mrfld_adc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
lp8788_adc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
lpc18xx_adc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
lpc32xx_adc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ltc2471.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ltc2485.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ltc2496.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ltc2497-core.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ltc2497.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ltc2497.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
max1027.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
max1118.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
max1241.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
max1363.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
max9611.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
max11100.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mcp320x.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mcp3422.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mcp3911.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
men_z188_adc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
meson_saradc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mp2629_adc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mt6577_auxadc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mxs-lradc-adc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
nau7802.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
npcm_adc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
palmas_gpadc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qcom-pm8xxx-xoadc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qcom-spmi-adc5.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qcom-spmi-iadc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qcom-spmi-vadc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qcom-vadc-common.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qcom-vadc-common.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rcar-gyroadc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rn5t618-adc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rockchip_saradc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
s2mps23_adc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
s2mps25_adc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
s2mpu13_adc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sc27xx_adc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sd_adc_modulator.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
spear_adc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
stm32-adc-core.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
stm32-adc-core.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
stm32-adc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
stm32-dfsdm-adc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
stm32-dfsdm-core.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
stm32-dfsdm.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
stmpe-adc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
stx104.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sun4i-gpadc-iio.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ti-adc081c.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ti-adc084s021.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ti-adc108s102.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ti-adc128s052.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ti-adc161s626.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ti-adc0832.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ti-adc12138.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ti-ads124s08.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ti-ads1015.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ti-ads7950.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ti-ads8344.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ti-ads8688.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ti-tlc4541.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ti_am335x_adc.c iio: adc: ti_am335x_adc: Fix return value check of tiadc_request_dma() 2024-11-18 12:12:00 +01:00
twl4030-madc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
twl6030-gpadc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vf610_adc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
viperboard_adc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
xilinx-xadc-core.c iio: adc: xilinx-xadc: Don't clobber preset voltage/temperature thresholds 2024-11-18 10:58:32 +01:00
xilinx-xadc-events.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
xilinx-xadc.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00