cpufreq: imx6q: don't warn for disabling a non-existing frequency
authorChristoph Niedermaier <cniedermaier@dh-electronics.com>
Fri, 12 May 2023 15:07:11 +0000 (17:07 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 8 Dec 2023 07:51:19 +0000 (08:51 +0100)
commitd3788f6e9d5a9c9a869d6df386119197904a55f2
treee3e678b11be4d363a777d658f2656129af826019
parent195514bda626b16fb6ef9ff4172dc0433a3c105b
cpufreq: imx6q: don't warn for disabling a non-existing frequency

[ Upstream commit 11a3b0ac33d95aa84be426e801f800997262a225 ]

It is confusing if a warning is given for disabling a non-existent
frequency of the operating performance points (OPP). In this case
the function dev_pm_opp_disable() returns -ENODEV. Check the return
value and avoid the output of a warning in this case. Avoid code
duplication by using a separate function.

Signed-off-by: Christoph Niedermaier <cniedermaier@dh-electronics.com>
[ Viresh : Updated commit subject ]
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Stable-dep-of: 2e4e0984c7d6 ("cpufreq: imx6q: Don't disable 792 Mhz OPP unnecessarily")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/cpufreq/imx6q-cpufreq.c