Skip to content

Commit 0dc0eb7

Browse files
TinyWindzzrafaeljw
authored andcommitted
cpufreq: pmac64: add of_node_put()
of_find_node_by_path() acquires a reference to the node returned by it and that reference needs to be dropped by its caller. g5_neo2_cpufreq_init() doesn't do that, so fix it. Signed-off-by: Yangtao Li <tiny.windzz@gmail.com> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent 3be466d commit 0dc0eb7

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/cpufreq/pmac64-cpufreq.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -411,6 +411,7 @@ static int __init g5_neo2_cpufreq_init(struct device_node *cpunode)
411411
pfunc_set_vdnap0 = pmf_find_function(root, "set-vdnap0");
412412
pfunc_vdnap0_complete =
413413
pmf_find_function(root, "slewing-done");
414+
of_node_put(root);
414415
if (pfunc_set_vdnap0 == NULL ||
415416
pfunc_vdnap0_complete == NULL) {
416417
pr_err("Can't find required platform function\n");

0 commit comments

Comments
 (0)