PM / OPP: add missing of_node_put() for of_get_cpu_node()
authorSudeep Holla <Sudeep.Holla@arm.com>
Thu, 12 Oct 2017 10:32:23 +0000 (11:32 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 13 Oct 2017 22:49:41 +0000 (00:49 +0200)
commit9867999f3a85b52f96ef05fca00cc8128eed01ce
tree2814b3e2b870950469b7c9f4d7296e07f2782c92
parent604a7aeb4325b8ecb23df163c89fc12248302a4e
PM / OPP: add missing of_node_put() for of_get_cpu_node()

Commit 762792913f8c (PM / OPP: Fix get sharing CPUs when hotplug
is used) moved away from using cpu_dev->of_node because of some
limitations.

However, commit 7467c9d95989 (of: return of_get_cpu_node from
of_cpu_device_node_get if CPUs are not registered) added support to
fall back to of_get_cpu_node() if called if CPUs are not registered
yet.

Add the missing of_node_put() for the CPU device nodes. Also go back
to using of_cpu_device_node_get() in dev_pm_opp_of_get_sharing_cpus()
to avoid scanning the device tree again.

Acked-by: Viresh Kumar <vireshk@kernel.org>
Fixes: 762792913f8c (PM / OPP: Fix get sharing CPUs when hotplug is used)
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/opp/of.c