summaryrefslogtreecommitdiffstats
path: root/drivers/cpufreq/brcmstb-avs-cpufreq.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--drivers/cpufreq/brcmstb-avs-cpufreq.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/cpufreq/brcmstb-avs-cpufreq.c b/drivers/cpufreq/brcmstb-avs-cpufreq.c
index 35fb3a559e..1a1857b0a6 100644
--- a/drivers/cpufreq/brcmstb-avs-cpufreq.c
+++ b/drivers/cpufreq/brcmstb-avs-cpufreq.c
@@ -481,6 +481,8 @@ static bool brcm_avs_is_firmware_loaded(struct private_data *priv)
static unsigned int brcm_avs_cpufreq_get(unsigned int cpu)
{
struct cpufreq_policy *policy = cpufreq_cpu_get(cpu);
+ if (!policy)
+ return 0;
struct private_data *priv = policy->driver_data;
cpufreq_cpu_put(policy);