Commit ccd7567d authored by Liang He's avatar Liang He Committed by Viresh Kumar

cpufreq: pmac32-cpufreq: Fix refcount leak bug

In pmac_cpufreq_init_MacRISC3(), we need to add corresponding
of_node_put() for the three node pointers whose refcount have
been incremented by of_find_node_by_name().
Signed-off-by: default avatarLiang He <windhl@126.com>
Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
parent 668a7a12
...@@ -470,6 +470,10 @@ static int pmac_cpufreq_init_MacRISC3(struct device_node *cpunode) ...@@ -470,6 +470,10 @@ static int pmac_cpufreq_init_MacRISC3(struct device_node *cpunode)
if (slew_done_gpio_np) if (slew_done_gpio_np)
slew_done_gpio = read_gpio(slew_done_gpio_np); slew_done_gpio = read_gpio(slew_done_gpio_np);
of_node_put(volt_gpio_np);
of_node_put(freq_gpio_np);
of_node_put(slew_done_gpio_np);
/* If we use the frequency GPIOs, calculate the min/max speeds based /* If we use the frequency GPIOs, calculate the min/max speeds based
* on the bus frequencies * on the bus frequencies
*/ */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment