diff options
author | Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> | 2005-08-25 13:14:06 -0700 |
---|---|---|
committer | Dave Jones <davej@redhat.com> | 2005-08-31 22:21:28 -0700 |
commit | 8085e1f1f0645fc6ddefcb54fdcba95808df5049 (patch) | |
tree | 9e275032a6084be99b2e7cd1d63bfd42b990d05a /drivers/cpufreq | |
parent | 6b39374a27eb4be7e9d82145ae270ba02ea90dc8 (diff) | |
download | kernel_samsung_aries-8085e1f1f0645fc6ddefcb54fdcba95808df5049.zip kernel_samsung_aries-8085e1f1f0645fc6ddefcb54fdcba95808df5049.tar.gz kernel_samsung_aries-8085e1f1f0645fc6ddefcb54fdcba95808df5049.tar.bz2 |
[CPUFREQ] Bugfix: Call driver exit in cpufreq_add_dev error path
A minor fix for cpufreq_add_dev() error path. We need to call driver->exit()
if driver_init() call has succeeded.
Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Dave Jones <davej@redhat.com>
Diffstat (limited to 'drivers/cpufreq')
-rw-r--r-- | drivers/cpufreq/cpufreq.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index 10b0149..109d62c 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c @@ -627,7 +627,7 @@ static int cpufreq_add_dev (struct sys_device * sys_dev) ret = kobject_register(&policy->kobj); if (ret) - goto err_out; + goto err_out_driver_exit; /* set up files for this cpu device */ drv_attr = cpufreq_driver->attr; @@ -673,6 +673,10 @@ err_out_unregister: kobject_unregister(&policy->kobj); wait_for_completion(&policy->kobj_unregister); +err_out_driver_exit: + if (cpufreq_driver->exit) + cpufreq_driver->exit(policy); + err_out: kfree(policy); |