[PATCH v3 0/2] iio: gyro: mpu3050: add missing trigger cleanup
From: Joshua Crofts
Date: Sat Oct 17 2026 - 01:19:55 EST
This series fixes an ignored error return value that causes the device
to behave in a weird polling state and a subsequent use-after-free bug
reported by Dingisoul.
Signed-off-by: Joshua Crofts <joshua.crofts1@xxxxxxxxx>
---
Changes in v3:
- Add a separate patch addressing the missing goto on trigger register
failure
- Link to v2: https://lore.kernel.org/r/20261015-mpu3050-fix-v2-1-53f73581e62c@xxxxxxxxx
Changes in v2:
- Add a local struct iio_trigger and assign it to the data struct only
after a successful IRQ request to prevent a null pointer deref as
pointed out by Sashiko
- Link to v1: https://lore.kernel.org/r/20261011-mpu3050-fix-v1-1-f55b0d138be4@xxxxxxxxx
---
Joshua Crofts (2):
iio: gyro: mpu3050: fail probe() on trigger registration failure
iio: gyro: mpu3050: add missing trigger cleanup on remove()
drivers/iio/gyro/mpu3050-core.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
---
base-commit: a3b3580713f3ac5a32dc2874ee546828977a1d68
change-id: 20261011-mpu3050-fix-145a77d5229b
Best regards,
--
Joshua Crofts