linux-yocto/drivers/iio/accel
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
..
adis16201.c iio: adis16201: Correct inclinometer channel resolution 2025-05-18 08:24:52 +02:00
adis16209.c
adxl313_core.c
adxl313_i2c.c
adxl313_spi.c iio: accel: adxl313: simplify with spi_get_device_match_data() 2024-06-13 19:19:23 +01:00
adxl313.h
adxl345_core.c iio: accel: adxl345: Add comment to probe 2024-04-06 16:18:39 +01:00
adxl345_i2c.c iio: accel: adxl345: Pass function pointer to core 2024-04-06 16:18:39 +01:00
adxl345_spi.c iio: accel: adxl345: Add spi-3wire option 2024-04-06 16:18:39 +01:00
adxl345.h iio: accel: adxl345: Add spi-3wire option 2024-04-06 16:18:39 +01:00
adxl355_core.c iio: accel: adxl355: Make timestamp 64-bit aligned using aligned_s64 2025-05-18 08:24:56 +02:00
adxl355_i2c.c
adxl355_spi.c iio: accel: adxl355: simplify with spi_get_device_match_data() 2024-06-13 19:19:23 +01:00
adxl355.h
adxl367_i2c.c iio: Drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-05-27 09:48:57 +01:00
adxl367_spi.c iio: accel: adxl367: Constify struct regmap_bus 2024-07-29 20:31:09 +01:00
adxl367.c iio: accel: adxl367: fix setting odr for activity time update 2025-05-18 08:24:56 +02:00
adxl367.h
adxl372_i2c.c iio: Drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-05-27 09:48:57 +01:00
adxl372_spi.c iio: accel: adxl372: Switch from linux/of.h to linux/mod_devicetable.h 2024-02-28 19:26:35 +00:00
adxl372.c iio: accel: adxl372: make use of iio_get_masklength() 2024-07-29 20:31:07 +01:00
adxl372.h
adxl380_i2c.c iio: accel: add ADXL380 driver 2024-08-03 10:13:36 +01:00
adxl380_spi.c iio: accel: add ADXL380 driver 2024-08-03 10:13:36 +01:00
adxl380.c iio: accel: adxl380: fix raw sample read 2024-12-05 14:02:37 +01:00
adxl380.h iio: accel: add ADXL380 driver 2024-08-03 10:13:36 +01:00
bma180.c iio: accel: bma180: make use of iio_for_each_active_channel() 2024-07-29 20:31:07 +01:00
bma220_spi.c
bma400_core.c IIO: 1st set of fixes for the 6.12 cycle. 2024-10-13 17:23:47 +02:00
bma400_i2c.c iio: Drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-05-27 09:48:57 +01:00
bma400_spi.c iio: accel: bma400: Constify struct regmap_bus 2024-07-29 20:31:09 +01:00
bma400.h
bmc150-accel-core.c iio: accel: bmc150: Improve bmc150_apply_bosc0200_acpi_orientation() 2024-09-03 18:49:43 +01:00
bmc150-accel-i2c.c iio: accel: bmc150: Document duplicate ACPI entries with bmi323 driver 2024-02-19 19:34:44 +00:00
bmc150-accel-spi.c iio: accel: bmc150: Drop ACPI_PTR() 2024-01-23 22:06:54 +00:00
bmc150-accel.h
bmi088-accel-core.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
bmi088-accel-i2c.c iio: accel: bmi088: add i2c support for bmi088 accel driver 2024-01-23 22:06:56 +00:00
bmi088-accel-spi.c iio: accel: bmi088: Constify struct regmap_bus 2024-07-29 20:31:10 +01:00
bmi088-accel.h
cros_ec_accel_legacy.c iio: accel: cros_ec_accel_legacy: make use of iio_get_masklength() 2024-07-29 20:31:08 +01:00
da280.c iio: accel: da280: Stop using ACPI_PTR() 2024-01-23 22:06:54 +00:00
da311.c iio: Drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-05-27 09:48:57 +01:00
dmard06.c iio: Drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-05-27 09:48:57 +01:00
dmard09.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
dmard10.c iio: Drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-05-27 09:48:57 +01:00
fxls8962af-core.c iio: accel: fxls8962af: Fix use after free in fxls8962af_fifo_flush 2025-07-24 08:56:27 +02:00
fxls8962af-i2c.c
fxls8962af-spi.c
fxls8962af.h
hid-sensor-accel-3d.c
Kconfig iio: accel: kx022a: add missing select IIO_(TRIGGERED_)BUFFER in Kconfig 2024-10-06 16:27:25 +01:00
kionix-kx022a-i2c.c
kionix-kx022a-spi.c
kionix-kx022a.c iio: accel: kx022a: Fix raw read format 2024-12-09 10:41:09 +01:00
kionix-kx022a.h
kxcjk-1013.c iio: accel: kxcjk-1013: Add support for KX022-1020 2024-08-03 10:13:38 +01:00
kxsd9-i2c.c iio: Drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-05-27 09:48:57 +01:00
kxsd9-spi.c iio: accel: kxsd9: Switch from linux/of.h to linux/mod_devicetable.h 2024-02-28 19:26:35 +00:00
kxsd9.c iio: accel: kxsd9: Make use of regmap_clear_bits() 2024-06-25 21:04:43 +01:00
kxsd9.h
Makefile iio: accel: add ADXL380 driver 2024-08-03 10:13:36 +01:00
mc3230.c iio: Drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-05-27 09:48:57 +01:00
mma7455_core.c
mma7455_i2c.c iio: Drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-05-27 09:48:57 +01:00
mma7455_spi.c
mma7455.h
mma7660.c iio: accel: mma7660: add mount-matrix support 2024-06-13 19:19:22 +01:00
mma8452.c iio: accel: mma8452: Ensure error return on failure to matching oversampling ratio 2025-04-10 14:39:23 +02:00
mma9551_core.c
mma9551_core.h
mma9551.c iio: Drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-05-27 09:48:57 +01:00
mma9553.c iio: Drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-05-27 09:48:57 +01:00
msa311.c iio: accel: msa311: Fix failure to release runtime pm if direct mode claim fails. 2025-04-10 14:39:23 +02:00
mxc4005.c iio: Drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-05-27 09:48:57 +01:00
mxc6255.c iio: Drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-05-27 09:48:57 +01:00
sca3000.c
sca3300.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
ssp_accel_sensor.c
st_accel_buffer.c
st_accel_core.c iio: common: st_sensors: Fix use of uninitialize device structs 2025-07-24 08:56:28 +02:00
st_accel_i2c.c iio: accel: st_accel: add support for LIS2DS12 2024-06-25 21:04:49 +01:00
st_accel_spi.c iio: accel: st_accel: add support for LIS2DS12 2024-06-25 21:04:49 +01:00
st_accel.h iio: accel: st_accel: add support for LIS2DS12 2024-06-25 21:04:49 +01:00
stk8ba50.c iio: accel: stk8ba50: make use of iio_for_each_active_channel() 2024-07-29 20:31:08 +01:00
stk8312.c iio: accel: stk8312: make use of iio_for_each_active_channel() 2024-07-29 20:31:08 +01:00