lkml.org 
[lkml]   [2015]   [Oct]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 67/70] cpufreq: interactive: Put global cpufreq kobject on failure
    Date
    From: Junjie Wu <junjiew@codeaurora.org>

    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>
    Signed-off-by: Bálint Czobor <czoborbalint@gmail.com>
    ---
    drivers/cpufreq/cpufreq_interactive.c | 4 +++-
    1 file changed, 3 insertions(+), 1 deletion(-)

    diff --git a/drivers/cpufreq/cpufreq_interactive.c b/drivers/cpufreq/cpufreq_interactive.c
    index 9faa189..2055266 100644
    --- a/drivers/cpufreq/cpufreq_interactive.c
    +++ b/drivers/cpufreq/cpufreq_interactive.c
    @@ -1180,8 +1180,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;
    }

    --
    1.7.9.5


    \
     
     \ /
      Last update: 2015-10-27 19:01    [W:4.121 / U:0.280 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site