cpufreq: scmi: process the result of devm_of_clk_add_hw_provider()
authorAlexandra Diupina <adiupina@astralinux.ru>
Tue, 5 Dec 2023 15:12:20 +0000 (18:12 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Jan 2024 23:35:14 +0000 (15:35 -0800)
commit5dd08ac0bc658bdb918b43f1aff400f0de6a060a
treeac61925a7a7fe87771898e59a41e20d4fe99e581
parent8271d397a9ff4ad8356e497bcd4272d234e038ec
cpufreq: scmi: process the result of devm_of_clk_add_hw_provider()

[ Upstream commit c4a5118a3ae1eadc687d84eef9431f9e13eb015c ]

devm_of_clk_add_hw_provider() may return an errno, so
add a return value check

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Fixes: 8410e7f3b31e ("cpufreq: scmi: Fix OPP addition failure with a dummy clock provider")
Signed-off-by: Alexandra Diupina <adiupina@astralinux.ru>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/cpufreq/scmi-cpufreq.c