cpufreq: CPPC: Fix potential memleak in cppc_cpufreq_cpu_init
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: NVincent Guittot <vincent.guittot@linaro.org> Reviewed-by: NIonela Voinescu <ionela.voinescu@arm.com> Tested-by: NQian Cai <quic_qiancai@quicinc.com> Signed-off-by: NViresh Kumar <viresh.kumar@linaro.org>
Showing
想要评论请 注册 或 登录