diff options
author | Florian Fainelli <f.fainelli@gmail.com> | 2019-05-22 21:45:46 +0300 |
---|---|---|
committer | Viresh Kumar <viresh.kumar@linaro.org> | 2019-06-04 07:01:33 +0300 |
commit | 22a26cc6a51ef73dcfeb64c50513903f6b2d53d8 (patch) | |
tree | 8dd2b3ea284984148fa203810d30c33f92ab990c /drivers/cpufreq/brcmstb-avs-cpufreq.c | |
parent | 036eb5c6d532a0fa1cea854814628be625809c4e (diff) | |
download | linux-22a26cc6a51ef73dcfeb64c50513903f6b2d53d8.tar.xz |
cpufreq: brcmstb-avs-cpufreq: Fix initial command check
There is a logical error in brcm_avs_is_firmware_loaded() whereby if the
firmware returns -EINVAL, we will be reporting this as an error. The
comment is correct, the code was not.
Fixes: de322e085995 ("cpufreq: brcmstb-avs-cpufreq: AVS CPUfreq driver for Broadcom STB SoCs")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Acked-by: Markus Mayer <mmayer@broadcom.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Diffstat (limited to 'drivers/cpufreq/brcmstb-avs-cpufreq.c')
-rw-r--r-- | drivers/cpufreq/brcmstb-avs-cpufreq.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/cpufreq/brcmstb-avs-cpufreq.c b/drivers/cpufreq/brcmstb-avs-cpufreq.c index e6f9cbe5835f..6ed53ca8aa98 100644 --- a/drivers/cpufreq/brcmstb-avs-cpufreq.c +++ b/drivers/cpufreq/brcmstb-avs-cpufreq.c @@ -446,8 +446,8 @@ static bool brcm_avs_is_firmware_loaded(struct private_data *priv) rc = brcm_avs_get_pmap(priv, NULL); magic = readl(priv->base + AVS_MBOX_MAGIC); - return (magic == AVS_FIRMWARE_MAGIC) && (rc != -ENOTSUPP) && - (rc != -EINVAL); + return (magic == AVS_FIRMWARE_MAGIC) && ((rc != -ENOTSUPP) || + (rc != -EINVAL)); } static unsigned int brcm_avs_cpufreq_get(unsigned int cpu) |