diff options
| -rw-r--r-- | drivers/cpufreq/cpufreq.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index c66eefe928c5..57a3853a55fb 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c | |||
| @@ -1134,6 +1134,11 @@ static struct cpufreq_policy *cpufreq_policy_alloc(unsigned int cpu) | |||
| 1134 | cpufreq_global_kobject, "policy%u", cpu); | 1134 | cpufreq_global_kobject, "policy%u", cpu); |
| 1135 | if (ret) { | 1135 | if (ret) { |
| 1136 | pr_err("%s: failed to init policy->kobj: %d\n", __func__, ret); | 1136 | pr_err("%s: failed to init policy->kobj: %d\n", __func__, ret); |
| 1137 | /* | ||
| 1138 | * The entire policy object will be freed below, but the extra | ||
| 1139 | * memory allocated for the kobject name needs to be freed by | ||
| 1140 | * releasing the kobject. | ||
| 1141 | */ | ||
| 1137 | kobject_put(&policy->kobj); | 1142 | kobject_put(&policy->kobj); |
| 1138 | goto err_free_real_cpus; | 1143 | goto err_free_real_cpus; |
| 1139 | } | 1144 | } |
