diff options
author | Yangtao Li <tiny.windzz@gmail.com> | 2018-11-23 14:33:40 +0100 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2018-11-29 22:35:03 +0100 |
commit | 0dc0eb78155bcc997932b7f19151ae3dd2748096 (patch) | |
tree | 5f39bf54a5d89d6865c14e5a2e9283fb683d353e /drivers/cpufreq/pmac64-cpufreq.c | |
parent | cpufreq: powernv: add of_node_put() (diff) | |
download | linux-0dc0eb78155bcc997932b7f19151ae3dd2748096.tar.xz linux-0dc0eb78155bcc997932b7f19151ae3dd2748096.zip |
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>
Diffstat (limited to 'drivers/cpufreq/pmac64-cpufreq.c')
-rw-r--r-- | drivers/cpufreq/pmac64-cpufreq.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/cpufreq/pmac64-cpufreq.c b/drivers/cpufreq/pmac64-cpufreq.c index be623dd7b9f2..1d32a863332d 100644 --- a/drivers/cpufreq/pmac64-cpufreq.c +++ b/drivers/cpufreq/pmac64-cpufreq.c @@ -411,6 +411,7 @@ static int __init g5_neo2_cpufreq_init(struct device_node *cpunode) pfunc_set_vdnap0 = pmf_find_function(root, "set-vdnap0"); pfunc_vdnap0_complete = pmf_find_function(root, "slewing-done"); + of_node_put(root); if (pfunc_set_vdnap0 == NULL || pfunc_vdnap0_complete == NULL) { pr_err("Can't find required platform function\n"); |