summaryrefslogtreecommitdiffstats
path: root/drivers/cpufreq/brcmstb-avs-cpufreq.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/cpufreq/brcmstb-avs-cpufreq.c')
-rw-r--r--drivers/cpufreq/brcmstb-avs-cpufreq.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/cpufreq/brcmstb-avs-cpufreq.c b/drivers/cpufreq/brcmstb-avs-cpufreq.c
index f644c5e32..552db816e 100644
--- a/drivers/cpufreq/brcmstb-avs-cpufreq.c
+++ b/drivers/cpufreq/brcmstb-avs-cpufreq.c
@@ -481,8 +481,11 @@ 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);
- struct private_data *priv = policy->driver_data;
+ struct private_data *priv;
+ if (!policy)
+ return 0;
+ priv = policy->driver_data;
cpufreq_cpu_put(policy);
return brcm_avs_get_frequency(priv->base);