Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

cpufreq: brcmstb-avs-cpufreq: Fix resource leaks in ->remove()

If 'cpufreq_unregister_driver()' fails, just WARN and continue, so that
other resources are freed.

Fixes: de322e085995 ("cpufreq: brcmstb-avs-cpufreq: AVS CPUfreq driver for Broadcom STB SoCs")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
[ Viresh: Updated Subject ]
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>

authored by

Christophe JAILLET and committed by
Viresh Kumar
3657f729 05f45628

+1 -2
+1 -2
drivers/cpufreq/brcmstb-avs-cpufreq.c
··· 754 754 int ret; 755 755 756 756 ret = cpufreq_unregister_driver(&brcm_avs_driver); 757 - if (ret) 758 - return ret; 757 + WARN_ON(ret); 759 758 760 759 brcm_avs_prepare_uninit(pdev); 761 760