This is a note to let you know that I've just added the patch titled iio: dln2: Check return value of devm_iio_trigger_register() to the 5.15-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: iio-dln2-check-return-value-of-devm_iio_trigger_register.patch and it can be found in the queue-5.15 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 90751fb9f224e0e1555b49a8aa9e68f6537e4cec Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen <lars@xxxxxxxxxx> Date: Mon, 1 Nov 2021 14:30:43 +0100 Subject: iio: dln2: Check return value of devm_iio_trigger_register() From: Lars-Peter Clausen <lars@xxxxxxxxxx> commit 90751fb9f224e0e1555b49a8aa9e68f6537e4cec upstream. Registering a trigger can fail and the return value of devm_iio_trigger_register() must be checked. Otherwise undefined behavior can occur when the trigger is used. Fixes: 7c0299e879dd ("iio: adc: Add support for DLN2 ADC") Signed-off-by: Lars-Peter Clausen <lars@xxxxxxxxxx> Link: https://lore.kernel.org/r/20211101133043.6974-1-lars@xxxxxxxxxx Cc: <stable@xxxxxxxxxxxxxxx> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/iio/adc/dln2-adc.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) --- a/drivers/iio/adc/dln2-adc.c +++ b/drivers/iio/adc/dln2-adc.c @@ -655,7 +655,11 @@ static int dln2_adc_probe(struct platfor return -ENOMEM; } iio_trigger_set_drvdata(dln2->trig, dln2); - devm_iio_trigger_register(dev, dln2->trig); + ret = devm_iio_trigger_register(dev, dln2->trig); + if (ret) { + dev_err(dev, "failed to register trigger: %d\n", ret); + return ret; + } iio_trigger_set_immutable(indio_dev, dln2->trig); ret = devm_iio_triggered_buffer_setup(dev, indio_dev, NULL, Patches currently in stable-queue which might be from lars@xxxxxxxxxx are queue-5.15/iio-trigger-fix-reference-counting.patch queue-5.15/iio-itg3200-call-iio_trigger_notify_done-on-error.patch queue-5.15/iio-ad7768-1-call-iio_trigger_notify_done-on-error.patch queue-5.15/iio-dln2-check-return-value-of-devm_iio_trigger_register.patch queue-5.15/iio-stk3310-don-t-return-error-code-in-interrupt-handler.patch queue-5.15/iio-mma8452-fix-trigger-reference-couting.patch queue-5.15/iio-kxsd9-don-t-return-error-code-in-trigger-handler.patch queue-5.15/iio-ltr501-don-t-return-error-code-in-trigger-handler.patch