]> git.baikalelectronics.ru Git - kernel.git/commit
leds: is31fl319x: Fix devm vs. non-devm ordering
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Tue, 12 Jul 2022 10:08:36 +0000 (12:08 +0200)
committerPavel Machek <pavel@ucw.cz>
Tue, 2 Aug 2022 14:43:31 +0000 (16:43 +0200)
commitebbb9ee746fc228fba5f93f6f89e648d4442ae8d
treed777e38296dcff67e32d7de55d3da8f1295caf47
parent428d70e8d76dce81cb235142f015350058e53eaf
leds: is31fl319x: Fix devm vs. non-devm ordering

When non-devm resources are allocated they mustn't be followed by
devm allocations, otherwise it will break the tear down ordering
and might lead to crashes or other bugs during ->remove() stage.
Fix this by wrapping mutex_destroy() call with
devm_add_action_or_reset().

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Vincent Knecht <vincent.knecht@mailoo.org>
Signed-off-by: Pavel Machek <pavel@ucw.cz>
drivers/leds/leds-is31fl319x.c