Commit e1b2b2b6 authored by Viresh Kumar's avatar Viresh Kumar Committed by Greg Kroah-Hartman
Browse files

cpufreq: CPPC: Fix potential memleak in cppc_cpufreq_cpu_init

[ Upstream commit fe2535a4 ]

It's a classic example of memleak, we allocate something, we fail and
never free the resources.

Make sure we free all resources on policy ->init() failures.

Fixes: a28b2bfc

 ("cppc_cpufreq: replace per-cpu data array with a list")
Tested-by: default avatarVincent Guittot <vincent.guittot@linaro.org>
Reviewed-by: default avatarIonela Voinescu <ionela.voinescu@arm.com>
Tested-by: default avatarQian Cai <quic_qiancai@quicinc.com>
Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent c898c9bf
Supports Markdown
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