Commit c3135d28 authored by Quanyang Wang's avatar Quanyang Wang Committed by Viresh Kumar
Browse files

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: default avatarQuanyang Wang <quanyang.wang@windriver.com>
[ Viresh: Massage changelog/subject, improve code. ]
Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
parent 2b53d1bd
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -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