Re: [PATCH v2] iio: dac: mcp47feb02: Fix mutex used before initialization
From: Andy Shevchenko
Date: Wed Feb 25 2026 - 11:20:57 EST
On Wed, Feb 25, 2026 at 10:48:57PM +0800, Felix Gu wrote:
> The mcp47feb02_parse_fw() function uses data->lock, but the mutex was
> initialized after this function in probe path.
>
> Since mcp47feb02_parse_fw() is only called from probe(), remove the lock.
But is it called early enough before anything that may trigger access to
'data'? Exempli gratia, IRQ handler in some cases may be triggered before
probe finished (is it the case here?).
--
With Best Regards,
Andy Shevchenko