[PATCH 0/3] thermal: Fix/cleanup error paths in __thermal_cooling_device_register()
From: Viresh Kumar
Date: Wed Jan 18 2023 - 04:34:18 EST
Hi,
The error paths in __thermal_cooling_device_register() are trying to free
un-acquired resources, fix that and clean it up a bit.
Caleb, can you please test this? I have just build tested it for now.
--
Viresh
Viresh Kumar (3):
thermal: core: call put_device() only after device_register() fails
thermal: core: Move cdev cleanup to thermal_release()
thermal: core: Use device_unregister() instead of device_del/put()
drivers/thermal/thermal_core.c | 29 +++++++++++++++--------------
1 file changed, 15 insertions(+), 14 deletions(-)
--
2.31.1.272.g89b43f80a514