Re: [PATCH] iio: dac: mcp47feb02: Fix mutex used before initialization
From: Andy Shevchenko
Date: Mon Feb 23 2026 - 06:37:06 EST
On Mon, Feb 23, 2026 at 11:13:33AM +0000, Nuno Sá wrote:
> On Mon, 2026-02-23 at 16:03 +0800, Felix Gu wrote:
> > The mcp47feb02_parse_fw() function uses data->lock, but the mutex was
> > initialized after this function in probe path.
> Actually I think the better fix is to not lock at all? Why do we need a lock around
> mcp47feb02_parse_fw() if it's only called from probe()?
+1! The lock should be called when it's required. Any explanations from the Git
history on it?
--
With Best Regards,
Andy Shevchenko