aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/cpufreq/cpufreq-dt.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/cpufreq/cpufreq-dt.c b/drivers/cpufreq/cpufreq-dt.c
index 9bc2720628a4..538abd50b77c 100644
--- a/drivers/cpufreq/cpufreq-dt.c
+++ b/drivers/cpufreq/cpufreq-dt.c
@@ -211,6 +211,17 @@ static int cpufreq_init(struct cpufreq_policy *policy)
211 /* OPPs might be populated at runtime, don't check for error here */ 211 /* OPPs might be populated at runtime, don't check for error here */
212 of_init_opp_table(cpu_dev); 212 of_init_opp_table(cpu_dev);
213 213
214 /*
215 * But we need OPP table to function so if it is not there let's
216 * give platform code chance to provide it for us.
217 */
218 ret = dev_pm_opp_get_opp_count(cpu_dev);
219 if (ret <= 0) {
220 pr_debug("OPP table is not ready, deferring probe\n");
221 ret = -EPROBE_DEFER;
222 goto out_free_opp;
223 }
224
214 priv = kzalloc(sizeof(*priv), GFP_KERNEL); 225 priv = kzalloc(sizeof(*priv), GFP_KERNEL);
215 if (!priv) { 226 if (!priv) {
216 ret = -ENOMEM; 227 ret = -ENOMEM;