diff options
author | Quanyang Wang <quanyang.wang@windriver.com> | 2021-03-25 07:42:08 +0100 |
---|---|---|
committer | Viresh Kumar <viresh.kumar@linaro.org> | 2021-03-25 07:58:09 +0100 |
commit | c3135d28a1e099bcc12c2c2a2a154275f49ce86b (patch) | |
tree | 1ea24566b3db58860b2bf77c494640721b49258f /drivers/cpufreq | |
parent | cpufreq: cppc: simplify default delay_us setting (diff) | |
download | linux-c3135d28a1e099bcc12c2c2a2a154275f49ce86b.tar.xz linux-c3135d28a1e099bcc12c2c2a2a154275f49ce86b.zip |
cpufreq: dt: dev_pm_opp_of_cpumask_add_table() may return -EPROBE_DEFER
The function dev_pm_opp_of_cpumask_add_table() may return -EPROBE_DEFER,
which needs to be propagated to the caller to try probing the driver
later on.
Signed-off-by: Quanyang Wang <quanyang.wang@windriver.com>
[ Viresh: Massage changelog/subject, improve code. ]
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Diffstat (limited to 'drivers/cpufreq')
-rw-r--r-- | drivers/cpufreq/cpufreq-dt.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/cpufreq/cpufreq-dt.c b/drivers/cpufreq/cpufreq-dt.c index b1e1bdc63b01..ece52863ba62 100644 --- a/drivers/cpufreq/cpufreq-dt.c +++ b/drivers/cpufreq/cpufreq-dt.c @@ -255,10 +255,15 @@ static int dt_cpufreq_early_init(struct device *dev, int cpu) * before updating priv->cpus. Otherwise, we will end up creating * duplicate OPPs for the CPUs. * - * OPPs might be populated at runtime, don't check for error here. + * OPPs might be populated at runtime, don't fail for error here unless + * it is -EPROBE_DEFER. */ - if (!dev_pm_opp_of_cpumask_add_table(priv->cpus)) + ret = dev_pm_opp_of_cpumask_add_table(priv->cpus); + if (!ret) { priv->have_static_opps = true; + } else if (ret == -EPROBE_DEFER) { + goto out; + } /* * The OPP table must be initialized, statically or dynamically, by this |