]> www.infradead.org Git - users/jedix/linux-maple.git/commit
spi: sg2044-nor: Fully convert to device managed resources
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Thu, 13 Mar 2025 11:12:59 +0000 (13:12 +0200)
committerMark Brown <broonie@kernel.org>
Sun, 16 Mar 2025 23:34:08 +0000 (23:34 +0000)
commitc6d94963333d6377382f26a480e687492f5a9174
treeb1318370d20b32d28a1aa9494198b3754d911b92
parent336a41c90c86b883aa06ed19f138eee19ddf9958
spi: sg2044-nor: Fully convert to device managed resources

The driver has a wrong order of the cleaning up the resources,
i.e. it first will destroy the mutex and only then free the SPI
which might still use it. Fix this by switching to devm_mutex_init().

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20250313111423.322775-2-andriy.shevchenko@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-sg2044-nor.c