linux/drivers/iio
Purva Yeshi ec80ee6ec2 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>
History 2025-07-06 10:57:55 +02:00
..
accel iio: accel: fxls8962af: Fix temperature calculation 2025-06-27 11:07:37 +01:00
adc iio: adc: ad_sigma_delta: Fix use of uninitialized status_pos 2025-07-06 10:57:55 +02:00
addac iio: addac: Kconfig: update ad74413r selections 2023-10-19 23:08:55 +02:00
afe iio: afe: rescale: Accept only offset channels 2023-11-02 09:35:29 +01:00
amplifiers iio: amplifiers: ada4250: add missing select REGMAP_SPI in Kconfig 2024-10-22 15:56:47 +02:00
buffer iio: buffer-dmaengine: fix releasing dma channel on error 2024-09-12 11:10:26 +02:00
cdc iio: cdc: ad7746: Move driver out of staging. 2022-08-15 22:30:01 +01:00
chemical iio: chemical: sps30: use aligned_s64 for timestamp 2025-05-22 14:10:01 +02:00
common iio: hid-sensors: Fix an error handling path in _hid_sensor_set_report_latency() 2024-10-22 15:56:47 +02:00
dac iio: dac: ad3552r: clear reset status flag 2025-03-13 12:53:23 +01:00
dummy iio: dummy: iio_simply_dummy_buffer: fix information leak in triggered buffer 2025-01-17 13:34:45 +01:00
filter iio: filter: admv8818: Support frequencies >= 2^32 2025-06-27 11:07:16 +01:00
frequency iio: frequency: admv4420: fix missing select REMAP_SPI in Kconfig 2024-11-01 01:55:58 +01:00
gyro iio: gyro: fxas21002c: Fix missing data update in trigger handler 2025-01-17 13:34:46 +01:00
health iio: health: afe4404: Fix oob read in afe4404_[read|write]_raw 2022-11-12 16:30:23 +00:00
humidity i2c: Make remove callback return void 2022-08-16 12:46:26 +02:00
imu iio: imu: inv_icm42600: Fix temperature calculation 2025-06-27 11:07:31 +01:00
light iio: light: as73211: fix channel handling in only-color triggered buffer 2025-02-21 13:49:48 +01:00
magnetometer iio: magnetometer: yas530: use signed integer type for clamp limits 2024-12-14 19:54:31 +01:00
multiplexer iio: multiplexer: Make use of device properties 2022-04-04 09:11:24 +01:00
orientation iio: hid-sensors: bind IIO channels alloc to device object 2021-07-13 18:21:53 +01:00
position iio: hid-sensors: Update header includes 2021-06-16 14:53:13 +01:00
potentiometer iio: potentiometer: mcp4131: Fix alignment for DMA safety 2022-06-14 11:53:19 +01:00
potentiostat i2c: Make remove callback return void 2022-08-16 12:46:26 +02:00
pressure iio: pressure: zpa2326: Use aligned_s64 for the timestamp 2025-07-06 10:57:55 +02:00
proximity iio: proximity: mb1232: add missing select IIO_(TRIGGERED_)BUFFER in Kconfig 2024-10-22 15:56:48 +02:00
resolver iio: resolver: ad2s90: Fix alignment for DMA safety 2022-06-14 11:53:19 +01:00
temperature iio: temp: maxim-thermocouple: Fix potential lack of DMA safe buffer. 2025-05-18 08:21:24 +02:00
test iio: test: Mark file local structure arrays static. 2022-08-15 22:30:01 +01:00
trigger iio: trigger: sysfs: fix possible memory leak in iio_sysfs_trig_init() 2022-10-24 18:48:57 +01:00
iio_core.h iio: Mark iio_device_type as const 2021-11-17 17:51:35 +00:00
iio_core_trigger.h iio: core-trigger: make iio_device_register_trigger_consumer() an int return 2021-03-11 20:47:02 +00:00
industrialio-buffer.c iio: buffer: make sure O_NONBLOCK is respected 2023-04-13 16:55:27 +02:00
industrialio-configfs.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
industrialio-core.c driver: iio: add missing checks on iio_info's callback access 2024-09-08 07:53:11 +02:00
industrialio-event.c driver: iio: add missing checks on iio_info's callback access 2024-09-08 07:53:11 +02:00
industrialio-sw-device.c iio: Don't use bare "unsigned" 2022-07-01 11:19:08 +01:00
industrialio-sw-trigger.c iio: core: Fix entry not deleted when iio_register_sw_trigger_type() fails 2022-11-12 17:53:35 +00:00
industrialio-trigger.c iio: Add blank lines after declarations. 2022-08-15 22:29:56 +01:00
industrialio-triggered-event.c iio: core: move @id from struct iio_dev to struct iio_dev_opaque 2021-05-17 13:49:13 +01:00
inkern.c iio: inkern: call iio_device_put() only on mapped devices 2025-01-17 13:34:46 +01:00
Kconfig iio: add filter subfolder 2021-12-16 17:29:46 +00:00
Makefile iio: add filter subfolder 2021-12-16 17:29:46 +00:00
TODO iio: add a TODO 2020-03-08 17:28:53 +00:00