Commit 6c3d8387 authored by Miquel Sabaté Solà's avatar Miquel Sabaté Solà Committed by Greg Kroah-Hartman
Browse files

cpufreq: Avoid a bad reference count on CPU node



[ Upstream commit c0f02536 ]

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>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 380bcd5a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment