Skip to content
Commit d769eaef authored by Shivani Gupta's avatar Shivani Gupta Committed by Viresh Kumar
Browse files

cpufreq: ti: Implement scope-based cleanup in ti_cpufreq_match_node()



Modify the ti_cpufreq_match_node() function to utilize the __free()
cleanup handler for automatically releasing the device node when it goes
out of scope.

By moving the declaration to the initialization, the patch ensures that
the device node is properly managed throughout the function's scope,
thus eliminating the need for manual invocation of of_node_put().
This approach reduces the potential for memory leaks.

Suggested-by: default avatarJulia Lawall <julia.lawall@inria.fr>
Signed-off-by: default avatarShivani Gupta <shivani07g@gmail.com>
Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
parent b69ec356
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment