diff options
Diffstat (limited to 'drivers/cpufreq')
-rw-r--r-- | drivers/cpufreq/cpufreq.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index 0675d9f02e34..0a6c4c8642e7 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c | |||
@@ -612,6 +612,7 @@ static int cpufreq_add_dev (struct sys_device * sys_dev) | |||
612 | ret = cpufreq_driver->init(policy); | 612 | ret = cpufreq_driver->init(policy); |
613 | if (ret) { | 613 | if (ret) { |
614 | dprintk("initialization failed\n"); | 614 | dprintk("initialization failed\n"); |
615 | mutex_unlock(&policy->lock); | ||
615 | goto err_out; | 616 | goto err_out; |
616 | } | 617 | } |
617 | 618 | ||
@@ -623,9 +624,10 @@ static int cpufreq_add_dev (struct sys_device * sys_dev) | |||
623 | strlcpy(policy->kobj.name, "cpufreq", KOBJ_NAME_LEN); | 624 | strlcpy(policy->kobj.name, "cpufreq", KOBJ_NAME_LEN); |
624 | 625 | ||
625 | ret = kobject_register(&policy->kobj); | 626 | ret = kobject_register(&policy->kobj); |
626 | if (ret) | 627 | if (ret) { |
628 | mutex_unlock(&policy->lock); | ||
627 | goto err_out_driver_exit; | 629 | goto err_out_driver_exit; |
628 | 630 | } | |
629 | /* set up files for this cpu device */ | 631 | /* set up files for this cpu device */ |
630 | drv_attr = cpufreq_driver->attr; | 632 | drv_attr = cpufreq_driver->attr; |
631 | while ((drv_attr) && (*drv_attr)) { | 633 | while ((drv_attr) && (*drv_attr)) { |