Re: [PATCH] iio: trigger: iio-trig-interrupt: use devm_* helpers
From: Andy Shevchenko
Date: Mon May 11 2026 - 09:48:56 EST
On Mon, May 11, 2026 at 11:07:32AM +0500, Stepan Ionichev wrote:
> Convert to devm_iio_trigger_alloc(), devm_request_irq() and
> devm_iio_trigger_register(). The driver-managed lifecycle removes
> the manual error-cleanup ladder in probe and the entire .remove
.remove()
> callback.
>
> Drop the now-unused iio_interrupt_trigger_info structure: its
> only purpose was to hold the IRQ number for the manual free_irq()
> call in .remove, which is no longer needed. The matching
.remove()
> linux/slab.h include is also dropped.
>
> No functional change.
...
> + ret = devm_request_irq(&pdev->dev, irq, iio_interrupt_trigger_poll,
> + irqflags, trig->name, trig);
> if (ret) {
> - dev_err(&pdev->dev,
> - "request IRQ-%d failed", irq);
> - goto error_free_trig_info;
> + dev_err(&pdev->dev, "request IRQ-%d failed", irq);
No, drop this now duplicate message.
> + return ret;
> }
--
With Best Regards,
Andy Shevchenko