Skip to content
Commit 05f45628 authored by Christophe JAILLET's avatar Christophe JAILLET Committed by Viresh Kumar
Browse files

cpufreq: brcmstb-avs-cpufreq: Free resources in error path

If 'cpufreq_register_driver()' fails, we must release the resources
allocated in 'brcm_avs_prepare_init()' as already done in the remove
function.

To do that, introduce a new function 'brcm_avs_prepare_uninit()' in order
to avoid code duplication. This also makes the code more readable (IMHO).

Fixes: de322e08

 ("cpufreq: brcmstb-avs-cpufreq: AVS CPUfreq driver for Broadcom STB SoCs")
Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
[ Viresh: Updated Subject ]
Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
parent 26699172
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