Re: [PATCH v1 1/3] gpio: pca9570: Use devm_mutex_init() for mutex initialization

From: Andy Shevchenko

Date: Tue Jan 13 2026 - 06:12:22 EST


On Tue, Jan 13, 2026 at 12:01:40PM +0100, Bartosz Golaszewski wrote:
> On Tue, Jan 13, 2026 at 11:09 AM Andy Shevchenko
> <andriy.shevchenko@xxxxxxxxxxxxxxx> wrote:
> >
> > Replace mutex_init() with the devm_mutex_init(), to ensure proper mutex
> > cleanup during probe failure and driver removal.
>
> Well, I can almost hear Johan Hovold yelling at you that this is not
> about mutex cleanup but merely a useless debugging feature.
>
> Though personally, I'm fine with it. Just reword the commit message
> because there's no actual cleanup happening other than freeing the
> memory allocated for the devres entry. :)

v2 is sent, thanks for review!

--
With Best Regards,
Andy Shevchenko