power: supply: bq27xxx: Use devm to free device mutex
authorAndrew Davis <afd@ti.com>
Tue, 23 Jan 2024 15:09:12 +0000 (09:09 -0600)
committerSebastian Reichel <sebastian.reichel@collabora.com>
Fri, 26 Jan 2024 23:49:17 +0000 (00:49 +0100)
commitf2d506d9fe10f0104951f61ad0d414ac8b8dbc38
tree592735bef9b5a255d8930f4fcb73d99e346a2532
parent73697f0acc773a357946a3c5a917bfb4c85128a3
power: supply: bq27xxx: Use devm to free device mutex

Use a device lifecycle managed action to free the device mutex.
This helps prevent mistakes like freeing out of order in cleanup
functions and forgetting to free on error paths.

Signed-off-by: Andrew Davis <afd@ti.com>
Link: https://lore.kernel.org/r/20240123150914.308510-3-afd@ti.com
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
drivers/power/supply/bq27xxx_battery.c