[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1364315169-15427-3-git-send-email-rui.zhang@intel.com>
Date: Wed, 27 Mar 2013 00:26:06 +0800
From: Zhang Rui <rui.zhang@...el.com>
To: linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org
Cc: amit.daniel@...sung.com, durgadoss.r@...el.com, andi@...as.de,
Zhang Rui <rui.zhang@...el.com>
Subject: [RFC PATCH 2/5] Thermal: thermal framework registration failure case cleanup
Signed-off-by: Zhang Rui <rui.zhang@...el.com>
---
drivers/thermal/thermal_core.c | 12 ++----------
1 file changed, 2 insertions(+), 10 deletions(-)
diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c
index 5b7863a..845ed6e 100644
--- a/drivers/thermal/thermal_core.c
+++ b/drivers/thermal/thermal_core.c
@@ -1863,13 +1863,9 @@ static int __init thermal_init(void)
int result = 0;
result = class_register(&thermal_class);
- if (result) {
- idr_destroy(&thermal_tz_idr);
- idr_destroy(&thermal_cdev_idr);
- mutex_destroy(&thermal_idr_lock);
- mutex_destroy(&thermal_list_lock);
+ if (result)
return result;
- }
+
result = genetlink_init();
return result;
}
@@ -1877,10 +1873,6 @@ static int __init thermal_init(void)
static void __exit thermal_exit(void)
{
class_unregister(&thermal_class);
- idr_destroy(&thermal_tz_idr);
- idr_destroy(&thermal_cdev_idr);
- mutex_destroy(&thermal_idr_lock);
- mutex_destroy(&thermal_list_lock);
genetlink_exit();
}
--
1.7.9.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists