Skip to content
Commit 6282fba6 authored by Javier Carrasco's avatar Javier Carrasco Committed by Viresh Kumar
Browse files

cpufreq: sun50i: fix memory leak in dt_has_supported_hw()

The for_each_child_of_node() loop does not decrement the child node
refcount before the break instruction, even though the node is no
longer required.

This can be avoided with the new for_each_child_of_node_scoped() macro
that removes the need for any of_node_put().

Fixes: fa5aec95

 ("cpufreq: sun50i: Add support for opp_supported_hw")
Signed-off-by: default avatarJavier Carrasco <javier.carrasco.cruz@gmail.com>
Reviewed-by: default avatarAndre Przywara <andre.przywara@arm.com>
Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
parent 1613e604
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment