From 361d75b4c1fd9a1b57401a6a9a4b808aae52d6aa Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Thu, 28 Jul 2022 09:37:06 +0200 Subject: [PATCH] Revert "thermal/core: Fix memory leak in __thermal_cooling_device_register()" This reverts commit 18530bedd221160823f63ccc20dd55c7a03edbcf which is commit 98a160e898c0f4a979af9de3ab48b4b1d42d1dbb upstream. It breaks the Android kernel ABI and is not needed for Android devices, so it is safe to revert for now. If it is determined that it is needed in the future, it can be brought back in an abi-preserving way. Bug: 161946584 Signed-off-by: Greg Kroah-Hartman Change-Id: Iba9a1c4019b19674fc3f9520b31e4e43be30c847 --- drivers/thermal/thermal_core.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c index a1721cdf37ec..e8da2cd61e77 100644 --- a/drivers/thermal/thermal_core.c +++ b/drivers/thermal/thermal_core.c @@ -1147,7 +1147,6 @@ __thermal_cooling_device_register(struct device_node *np, return cdev; out_kfree_type: - thermal_cooling_device_destroy_sysfs(cdev); kfree(cdev->type); put_device(&cdev->device); out_ida_remove: