Re: [PATCH] iio: sca3000: Fix a resource leak in sca3000_probe()
From: Jonathan Cameron
Date: Thu Jan 29 2026 - 13:24:39 EST
On Wed, 28 Jan 2026 20:15:06 +0530
Harshit Mogalapalli <harshit.m.mogalapalli@xxxxxxxxxx> wrote:
> Hi Andy,
>
> On 28/01/26 15:18, Andy Shevchenko wrote:
> > On Tue, Jan 27, 2026 at 10:49:49PM -0800, Harshit Mogalapalli wrote:
> >> spi->irq from request_threaded_irq() not released when
> >> iio_device_register() fails. Add an return value check and jump to a
> >> common error handler when iio_device_register() fails.
> >
> > LGTM, but I would rather converting this to use managed resources.
> >
>
> Thanks for the review.
>
> I’ll follow up with a separate patch that converts it to devm-based
> resource handling. Maybe that helps in a way to keep the fix and
> refactor separate ?
>
Yes.
> > So, if Jonathan wants to take this first,
> > Reviewed-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxx>
> >
Applied.
Not that often we get changes for this one. It was one of the
earliest IIO drivers. Anyhow, nothing wrong with modernising it
if you want to work on it!
Thanks,
Jonathan
>
> Thanks!
>
> Regards,
> Harshit
>
>