cpupfreq: tegra124: eliminate uses of of_node_put()
authorJavier Carrasco <javier.carrasco.cruz@gmail.com>
Sun, 7 Apr 2024 20:15:29 +0000 (22:15 +0200)
committerViresh Kumar <viresh.kumar@linaro.org>
Fri, 19 Apr 2024 06:25:44 +0000 (11:55 +0530)
commitb5e230aa8d0359bba49659c8358074755c6eb9e4
treefcd6cb79874a7d4bc65e19065ce858c0e2136a48
parent4cece764965020c22cff7665b18a012006359095
cpupfreq: tegra124: eliminate uses of of_node_put()

Make use of the __free() cleanup handler to automatically free nodes
when they get out of scope. Only the probe function is affected by this
modification.

Given that this mechanism requires the node to be initialized, its
initialization and the value check have been moved to the top of the
function.

After removing uses of of_node_put(), the jump to out_put_np is no
longer necessary.

Suggested-by: Julia Lawall <julia.lawall@inria.fr>
Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
drivers/cpufreq/tegra124-cpufreq.c