mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 11:46:19 +00:00
[CPUFREQ] Don't free held mutex in cpufreq_add_dev()
Make the cpufreq code play nicely with the mutex debugging code: don't free a held mutex. Cc: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Dave Jones <davej@redhat.com>
This commit is contained in:
parent
83933af472
commit
f3876c1bc7
1 changed files with 4 additions and 2 deletions
|
@ -612,6 +612,7 @@ static int cpufreq_add_dev (struct sys_device * sys_dev)
|
|||
ret = cpufreq_driver->init(policy);
|
||||
if (ret) {
|
||||
dprintk("initialization failed\n");
|
||||
mutex_unlock(&policy->lock);
|
||||
goto err_out;
|
||||
}
|
||||
|
||||
|
@ -623,9 +624,10 @@ static int cpufreq_add_dev (struct sys_device * sys_dev)
|
|||
strlcpy(policy->kobj.name, "cpufreq", KOBJ_NAME_LEN);
|
||||
|
||||
ret = kobject_register(&policy->kobj);
|
||||
if (ret)
|
||||
if (ret) {
|
||||
mutex_unlock(&policy->lock);
|
||||
goto err_out_driver_exit;
|
||||
|
||||
}
|
||||
/* set up files for this cpu device */
|
||||
drv_attr = cpufreq_driver->attr;
|
||||
while ((drv_attr) && (*drv_attr)) {
|
||||
|
|
Loading…
Reference in a new issue