cpufreq: interactive: Put global cpufreq kobject on failure
Fix failure recovery path in cpufreq_governor_interactive(). Call cpufreq_put_global_kobject() to release cpufreq global kobject upon governor init failure. Change-Id: I7a977070b7a3c75c90acccd2c117064ed1a10d0e Signed-off-by: Junjie Wu <junjiew@codeaurora.org>
This commit is contained in:
parent
1e04bc2c80
commit
10fe428971
1 changed files with 3 additions and 1 deletions
|
@ -1185,8 +1185,10 @@ static int cpufreq_governor_interactive(struct cpufreq_policy *policy,
|
|||
if (rc) {
|
||||
kfree(tunables);
|
||||
policy->governor_data = NULL;
|
||||
if (!have_governor_per_policy())
|
||||
if (!have_governor_per_policy()) {
|
||||
common_tunables = NULL;
|
||||
cpufreq_put_global_kobject();
|
||||
}
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue