On 12/19/2020 2:17 AM, Christophe JAILLET wrote: > 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: de322e085995 ("cpufreq: brcmstb-avs-cpufreq: AVS CPUfreq driver for Broadcom STB SoCs") > Signed-off-by: Christophe JAILLET <christophe.jaillet@xxxxxxxxxx> Acked-by: Florian Fainelli <f.fainelli@xxxxxxxxx> We could have considered switching to device managed APIs for automatic cleanup, but this will do as well. Thanks Christophe. -- Florian