From 864e3e7bd24fc7d25d6a2cfb48b5535354a10219 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Thu, 28 Jul 2022 09:36:36 +0200 Subject: [PATCH] Revert "thermal/core: Fix memory leak in the error path" This reverts commit 54cdc10ac7184f2159a4f5658b497e90244d1516 which is commit d44616c6cc3e35eea03ecfe9040edfa2b486a059 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: I83010322077db689f57ae26b2bc3775af944384f --- 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 3b60c44cde2c..444c5941c92c 100644 --- a/drivers/thermal/thermal_core.c +++ b/drivers/thermal/thermal_core.c @@ -1157,7 +1157,6 @@ out_kfree_type: out_ida_remove: ida_simple_remove(&thermal_cdev_ida, id); out_kfree_cdev: - kfree(cdev); return ERR_PTR(ret); }