Re: [PATCH] iio: admv1013: initialize callback mutex before registering notifier
Andy Shevchenko <[email protected]>
| Newsgroups | org.kernel.vger.linux-kernel,org.kernel.vger.linux-iio,org.kernel.vger.stable |
|---|---|
| Organization | Intel Finland Oy - BIC 0357606-4 - c/o Alberga Business Park, 6 krs, Bertel Jungin Aukio 5, 02600 Espoo |
| Message-ID | <[email protected]> |
On Tue, Aug 18, 2026 at 10:28:11PM +0800, Runyu Xiao wrote: > admv1013_probe() registers a clock notifier whose callback takes > st->lock on POST_RATE_CHANGE. Initialize the mutex before > devm_clk_notifier_register() so the callback cannot observe an > uninitialized lock during probe. ... > st->nb.notifier_call = admv1013_freq_change; > + mutex_init(&st->lock); > + Make it also to be devm_mutex_init(). > ret = devm_clk_notifier_register(&spi->dev, st->clkin, &st->nb); > if (ret) > return ret; -- With Best Regards, Andy Shevchenko