linux-yocto/drivers/iio
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
..
accel iio: accel: fxls8962af: Fix temperature calculation 2025-06-27 11:09:00 +01:00
adc iio: adc: ad_sigma_delta: Fix use of uninitialized status_pos 2025-07-06 11:00:07 +02:00
addac
afe
amplifiers
buffer
cdc
chemical iio: chemical: sps30: use aligned_s64 for timestamp 2025-05-22 14:12:14 +02:00
common
dac iio: dac: ad3552r: clear reset status flag 2025-03-13 12:58:38 +01:00
dummy
filter iio: filter: admv8818: Support frequencies >= 2^32 2025-06-19 15:28:30 +02:00
frequency
gyro
health
humidity
imu iio: imu: inv_icm42600: Fix temperature calculation 2025-06-27 11:08:51 +01:00
light iio: light: as73211: fix channel handling in only-color triggered buffer 2025-02-17 09:40:32 +01:00
magnetometer
multiplexer
orientation
position
potentiometer
potentiostat
pressure iio: pressure: zpa2326: Use aligned_s64 for the timestamp 2025-07-06 11:00:07 +02:00
proximity
resolver
temperature iio: temp: maxim-thermocouple: Fix potential lack of DMA safe buffer. 2025-05-18 08:24:09 +02:00
test
trigger
iio_core_trigger.h
iio_core.h
industrialio-backend.c
industrialio-buffer.c
industrialio-configfs.c
industrialio-core.c
industrialio-event.c
industrialio-gts-helper.c
industrialio-sw-device.c
industrialio-sw-trigger.c
industrialio-trigger.c
industrialio-triggered-event.c
inkern.c iio: inkern: call iio_device_put() only on mapped devices 2025-01-17 13:36:24 +01:00
Kconfig
Makefile
TODO