lkml.org 
[lkml]   [2013]   [Mar]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC, 2/5] Thermal: thermal framework registration failure case cleanup
On 26-03-2013 12:26, Zhang Rui wrote:
> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
>

Could you please describe why these resource releases are not required
anymore? Even on thermal_exit.

> ---
> 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();
> }
>
>



\
 
 \ /
  Last update: 2013-03-27 00:41    [W:0.131 / U:0.208 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site