Re: [PATCH v6 1/3] spi: spi-nxp-fspi: check return value of devm_mutex_init()

From: Andy Shevchenko
Date: Wed Jun 11 2025 - 04:38:14 EST


On Tue, Jun 10, 2025 at 12:46:12PM +0100, Mark Brown wrote:
> On Tue, Jun 10, 2025 at 12:57:37PM +0300, Andy Shevchenko wrote:
> > On Mon, Jun 09, 2025 at 09:59:46PM +0100, Mark Brown wrote:
>
> > > I don't understand the comment about leaking here? We might end up with
> > > an unitialised mutex but how would we leak anything?
>
> > In case if the mutex_init() allocates something that needs to be freed
> > (in the future).
>
> I don't see how checking the return value impacts that? The management
> via devm is still there either way.

I see now what you mean. Yes, this is more likely applicable to non-devm case.
Thomas, can you adjust the commit message(s), please, for v7?

--
With Best Regards,
Andy Shevchenko