linux-yocto/drivers/iio/adc
Purva Yeshi 1063c586a3 iio: adc: ad_sigma_delta: Fix use of uninitialized status_pos
[ Upstream commit e5cdb098a3 ]

Fix Smatch-detected issue:
drivers/iio/adc/ad_sigma_delta.c:604 ad_sd_trigger_handler() error:
uninitialized symbol 'status_pos'.

The variable `status_pos` was only initialized in specific switch cases
(1, 2, 3, 4), which could leave it uninitialized if `reg_size` had an
unexpected value.

Fix by adding a default case to the switch block to catch unexpected
values of `reg_size`. Use `dev_err_ratelimited()` for error logging and
`goto irq_handled` instead of returning early.

Signed-off-by: Purva Yeshi <purvayeshi550@gmail.com>
Link: https://patch.msgid.link/20250410170408.8585-1-purvayeshi550@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-07-06 11:00:07 +02:00
..
ab8500-gpadc.c
ad_sigma_delta.c iio: adc: ad_sigma_delta: Fix use of uninitialized status_pos 2025-07-06 11:00:07 +02:00
ad799x.c
ad4130.c iio: adc: ad4130: Fix comparison of channel setups 2025-04-10 14:37:33 +02:00
ad7091r-base.c iio: adc: ad7091r: Enable internal vref if external vref is not supplied 2024-01-31 16:18:47 -08:00
ad7091r-base.h iio: adc: ad7091r: Enable internal vref if external vref is not supplied 2024-01-31 16:18:47 -08:00
ad7091r5.c iio: adc: ad7091r: Allow users to configure device events 2024-01-31 16:18:47 -08:00
ad7124.c iio: adc: ad7124: Fix 3dB filter frequency reading 2025-06-19 15:28:31 +02:00
ad7192.c iio: adc: ad7192: properly check spi_get_device_match_data() 2025-01-09 13:31:46 +01:00
ad7266.c iio: adc: ad7266: Fix potential timestamp alignment issue. 2025-05-22 14:12:13 +02:00
ad7280a.c
ad7291.c
ad7292.c
ad7298.c
ad7476.c
ad7606_par.c iio: adc: ad7606: remove frstdata check for serial mode 2024-09-12 11:11:41 +02:00
ad7606_spi.c iio: adc: ad7606_spi: fix reg write value mask 2025-06-27 11:08:51 +01:00
ad7606.c iio: adc: ad7606: fix standby gpio state to match the documentation 2024-10-04 16:29:38 +02:00
ad7606.h iio: adc: ad7606: remove frstdata check for serial mode 2024-09-12 11:11:41 +02:00
ad7766.c
ad7768-1.c iio: adc: ad7768-1: Fix insufficient alignment of timestamp. 2025-05-22 14:12:14 +02:00
ad7780.c ad7780: fix division by zero in ad7780_write_raw() 2024-12-09 10:33:05 +01:00
ad7791.c
ad7793.c
ad7887.c
ad7923.c iio: adc: ad7923: Fix buffer overflow for tx_buf and ring_xfer 2024-12-09 10:33:09 +01:00
ad7949.c
ad9467.c iio: adc: ad9467: fix scan type sign 2024-06-21 14:38:37 +02:00
adi-axi-adc.c iio: adc: axi-adc: make sure AXI clock is enabled 2024-06-21 14:38:42 +02:00
aspeed_adc.c
at91_adc.c iio: adc: at91: call input_free_device() on allocated iio_dev 2025-01-17 13:36:24 +01:00
at91-sama5d2_adc.c iio: adc: at91-sama5d2_adc: fix sama7g5 realbits value 2025-03-13 12:58:38 +01:00
axp20x_adc.c
axp288_adc.c
bcm_iproc_adc.c
berlin2-adc.c
cc10001_adc.c
cpcap-adc.c
da9150-gpadc.c
dln2-adc.c iio: adc: dln2: Use aligned_s64 for timestamp 2025-05-18 08:24:09 +02:00
envelope-detector.c
ep93xx_adc.c
exynos_adc.c iio: exynos-adc: request second interupt only when touchscreen mode is used 2023-10-14 17:47:20 +01:00
fsl-imx25-gcq.c
hi8435.c
hx711.c
imx7d_adc.c
imx8qxp-adc.c iio: adc: imx8qxp: Fix address for command buffer registers 2023-10-05 18:06:45 +01:00
imx93_adc.c iio: adc: imx93: add four channels for imx93 adc 2024-01-01 12:42:37 +00:00
ina2xx-adc.c
ingenic-adc.c
intel_mrfld_adc.c
Kconfig iio: adc: ti-lmp92064: add missing select IIO_(TRIGGERED_)BUFFER in Kconfig 2024-11-01 01:58:26 +01:00
lp8788_adc.c
lpc18xx_adc.c
lpc32xx_adc.c
ltc2471.c
ltc2485.c
ltc2496.c
ltc2497-core.c
ltc2497.c
ltc2497.h
Makefile
max1027.c
max1118.c
max1241.c
max1363.c
max9611.c
max11100.c
max11205.c
max11410.c
max77541-adc.c
mcp320x.c
mcp3422.c
mcp3911.c
men_z188_adc.c
meson_saradc.c iio: adc: meson: add separate config for axg SoC family 2024-01-01 12:42:36 +00:00
mp2629_adc.c
mt6360-adc.c
mt6370-adc.c
mt6577_auxadc.c
mxs-lradc-adc.c
nau7802.c
npcm_adc.c
palmas_gpadc.c
qcom-pm8xxx-xoadc.c
qcom-spmi-adc5.c
qcom-spmi-iadc.c
qcom-spmi-rradc.c
qcom-spmi-vadc.c
qcom-vadc-common.c
rcar-gyroadc.c
rn5t618-adc.c
rockchip_saradc.c iio: adc: rockchip: Fix clock initialization sequence 2025-05-18 08:24:07 +02:00
rtq6056.c
rzg2l_adc.c
sc27xx_adc.c
sd_adc_modulator.c
spear_adc.c
stm32-adc-core.c iio: adc: stm32-adc: harden against NULL pointer deref in stm32_adc_probe() 2023-11-28 17:19:45 +00:00
stm32-adc-core.h
stm32-adc.c iio: adc: stm32: Fixing err code to not indicate success 2024-06-12 11:12:20 +02:00
stm32-dfsdm-adc.c
stm32-dfsdm-core.c
stm32-dfsdm.h
stmpe-adc.c
sun4i-gpadc-iio.c
sun20i-gpadc-iio.c
ti_am335x_adc.c of: remove internal arguments from of_property_for_each_u32() 2025-02-08 09:51:51 +01:00
ti-adc081c.c
ti-adc084s021.c
ti-adc108s102.c
ti-adc128s052.c
ti-adc161s626.c
ti-adc0832.c
ti-adc12138.c
ti-ads124s08.c iio: adc: ti-ads124s08: Use gpiod_set_value_cansleep() 2025-01-17 13:36:24 +01:00
ti-ads131e08.c
ti-ads1015.c
ti-ads1100.c
ti-ads7924.c
ti-ads7950.c
ti-ads8344.c
ti-ads8688.c iio: adc: ti-ads8688: fix information leak in triggered buffer 2025-01-17 13:36:23 +01:00
ti-lmp92064.c
ti-tlc4541.c
ti-tsc2046.c
twl4030-madc.c
twl6030-gpadc.c
vf610_adc.c
viperboard_adc.c
xilinx-ams.c iio: xilinx-ams: Don't include ams_ctrl_channels in scan_mask 2024-07-05 09:33:56 +02:00
xilinx-xadc-core.c iio: adc: xilinx-xadc: Correct temperature offset/scale for UltraScale 2023-10-13 19:10:39 +01:00
xilinx-xadc-events.c
xilinx-xadc.h iio: adc: xilinx-xadc: Correct temperature offset/scale for UltraScale 2023-10-13 19:10:39 +01:00