Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

PM / OPP: Don't WARN on multiple calls to dev_pm_opp_set_regulators()

If a platform specific OPP driver has called this routine first and set
the regulators, then the second call from cpufreq-dt driver will hit the
WARN_ON(). Remove the WARN_ON(), but continue to return error in such
cases.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
Tested-by: Dave Gerlach <d-gerlach@ti.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

authored by

Viresh Kumar and committed by
Rafael J. Wysocki
e231f8d7 4dab160e

+1 -1
+1 -1
drivers/base/power/opp/core.c
··· 1485 1485 } 1486 1486 1487 1487 /* Already have regulators set */ 1488 - if (WARN_ON(opp_table->regulators)) { 1488 + if (opp_table->regulators) { 1489 1489 ret = -EBUSY; 1490 1490 goto err; 1491 1491 }