linux-yocto/drivers/iio
Maud Spierings 610615c966 iio: common: st_sensors: Fix use of uninitialize device structs
commit 9f92e93e25 upstream.

Throughout the various probe functions &indio_dev->dev is used before it
is initialized. This caused a kernel panic in st_sensors_power_enable()
when the call to devm_regulator_bulk_get_enable() fails and then calls
dev_err_probe() with the uninitialized device.

This seems to only cause a panic with dev_err_probe(), dev_err(),
dev_warn() and dev_info() don't seem to cause a panic, but are fixed
as well.

The issue is reported and traced here: [1]

Link: https://lore.kernel.org/all/AM7P189MB100986A83D2F28AF3FFAF976E39EA@AM7P189MB1009.EURP189.PROD.OUTLOOK.COM/ [1]
Cc: stable@vger.kernel.org
Signed-off-by: Maud Spierings <maudspierings@gocontroll.com>
Reviewed-by: Andy Shevchenko <andy@kernel.org>
Link: https://... [1]
Link: https://patch.msgid.link/20250527-st_iio_fix-v4-1-12d89801c761@gocontroll.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-07-24 08:56:28 +02:00
..
accel iio: common: st_sensors: Fix use of uninitialize device structs 2025-07-24 08:56:28 +02:00
adc iio: adc: stm32-adc: Fix race in installing chained IRQ handler 2025-07-24 08:56:28 +02:00
addac
afe
amplifiers
buffer
cdc
chemical iio: chemical: sps30: use aligned_s64 for timestamp 2025-05-22 14:29:37 +02:00
common iio: common: st_sensors: Fix use of uninitialize device structs 2025-07-24 08:56:28 +02:00
dac iio: dac: ad3552r-common: fix ad3541/2r ranges 2025-07-06 11:01:49 +02:00
dummy
filter iio: filter: admv8818: Support frequencies >= 2^32 2025-06-19 15:32:12 +02:00
frequency
gyro
health
humidity
imu iio: imu: inv_icm42600: Fix temperature calculation 2025-06-27 11:11:26 +01:00
light iio: light: opt3001: fix deadlock due to concurrent flag access 2025-05-22 14:29:53 +02:00
magnetometer
multiplexer
orientation
position
potentiometer
potentiostat
pressure iio: pressure: zpa2326: Use aligned_s64 for the timestamp 2025-07-06 11:01:34 +02:00
proximity
resolver
temperature iio: temp: maxim-thermocouple: Fix potential lack of DMA safe buffer. 2025-05-18 08:24:56 +02:00
test
trigger
iio_core_trigger.h
iio_core.h
industrialio-acpi.c
industrialio-backend.c iio: backend: fix out-of-bound write 2025-07-24 08:56:28 +02:00
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
Kconfig
Makefile
TODO