Skip to content
Snippets Groups Projects
Commit c0f02536 authored by Miquel Sabaté Solà's avatar Miquel Sabaté Solà Committed by Rafael J. Wysocki
Browse files

cpufreq: Avoid a bad reference count on CPU node


In the parse_perf_domain function, if the call to
of_parse_phandle_with_args returns an error, then the reference to the
CPU device node that was acquired at the start of the function would not
be properly decremented.

Address this by declaring the variable with the __free(device_node)
cleanup attribute.

Signed-off-by: default avatarMiquel Sabaté Solà <mikisabate@gmail.com>
Acked-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
Link: https://patch.msgid.link/20240917134246.584026-1-mikisabate@gmail.com


Cc: All applicable <stable@vger.kernel.org>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 8b4865cd
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment