History

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().

Liang He committed 4 years ago

Commit ccd75671 parent 668a7a11 file · +4 −0Browse files

Unified · Split

drivers/cpufreq/pmac32-cpufreq.c+4−0
@@ -470,6 +470,10 @@ static int pmac_cpufreq_init_MacRISC3(struct device_node *cpunode) · 469 unmodified lines
470470 if (slew_done_gpio_np)
471471 slew_done_gpio = read_gpio(slew_done_gpio_np);
472472
473+ of_node_put(volt_gpio_np);
474+ of_node_put(freq_gpio_np);
475+ of_node_put(slew_done_gpio_np);
476+
473477 /* If we use the frequency GPIOs, calculate the min/max speeds based
474478 * on the bus frequencies
475479 */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t