History

ARM: rockchip: Add missing of_node_put() in rockchip_suspend_init()

In rockchip_suspend_init(), of_find_matching_node_and_match() will return a node pointer with refcount incremented. We should use of_node_put() in fail path or when it is not used anymore.

Liang He committed 4 years ago

Commit f4470db1 parent f2906aa1 file · +5 −2Browse files

Unified · Split

arch/arm/mach-rockchip/pm.c+5−2
@@ -311,7 +311,7 @@ void __init rockchip_suspend_init(void) · 310 unmodified lines
311 &match);311 &match);
312 if (!match) {312 if (!match) {
313 pr_err("Failed to find PMU node\n");313 pr_err("Failed to find PMU node\n");
314 return;314 goto out_put;
315 }315 }
316 pm_data = (struct rockchip_pm_data *) match->data;316 pm_data = (struct rockchip_pm_data *) match->data;
317 317
@@ -320,9 +320,12 @@ void __init rockchip_suspend_init(void) · 2 unmodified lines
320 320
321 if (ret) {321 if (ret) {
322 pr_err("%s: matches init error %d\n", __func__, ret);322 pr_err("%s: matches init error %d\n", __func__, ret);
323 return;323 goto out_put;
324 }324 }
325 }325 }
326 326
327 suspend_set_ops(pm_data->ops);327 suspend_set_ops(pm_data->ops);
328
329out_put:
330 of_node_put(np);
328}331}

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