cpufreq: mediatek: add missing platform_driver_unregister() on error in mtk_cpufreq_d...
authorQinglang Miao <miaoqinglang@huawei.com>
Sat, 31 Oct 2020 01:18:54 +0000 (09:18 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Jun 2022 08:21:19 +0000 (10:21 +0200)
commitc7b0ec974457b609aa35f11f8e2125c8a7b9ee05
treeeb469cbcee17e33e2d736a3721ac0ac6b2b2775f
parentfb02d6b5432d4de707bcfb47b9579da21e6bc17b
cpufreq: mediatek: add missing platform_driver_unregister() on error in mtk_cpufreq_driver_init

[ Upstream commit 2f05c19d9ef4f5a42634f83bdb0db596ffc0dd30 ]

Add the missing platform_driver_unregister() before return from
mtk_cpufreq_driver_init in the error handling case when failed
to register mtk-cpufreq platform device

Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/cpufreq/mediatek-cpufreq.c