[PATCH v3 0/2] iio: validate ACPI return types in sensor drivers

From: Tristan Madani

Date: Thu Oct 29 2026 - 07:12:16 EST


From: Tristan Madani <tristan@xxxxxxxxxxxxxxxxxxx>

Two IIO drivers access ACPI package members without type validation.
Use acpi_evaluate_object_typed() for the outer object and add inner
element type checks where needed.

Changes in v3:
- Fix alignment of acpi_evaluate_object_typed() continuation line to
match the opening parenthesis, per Jonathan Cameron

Changes in v2:
- Switch from post-hoc type check to acpi_evaluate_object_typed()
- Replace kfree() with ACPI_FREE() for ACPI-allocated buffers

Tristan Madani (2):
iio: light: cm32181: validate ACPI object type in
cm32181_acpi_get_cpm()
iio: imu: inv_mpu6050: validate ACPI object types in
asus_acpi_get_sensor_info()

drivers/iio/imu/inv_mpu6050/inv_mpu_acpi.c | 7 +++++--
drivers/iio/light/cm32181.c | 5 +++--
2 files changed, 8 insertions(+), 4 deletions(-)

--
2.47.3