From: Viresh Kumar Date: Thu, 1 Dec 2016 10:58:22 +0000 (+0530) Subject: PM / OPP: Don't WARN on multiple calls to dev_pm_opp_set_regulators() X-Git-Tag: v4.10-rc1~152^2~4^2 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=e231f8d7ed9a01280d18cd897ae0bbb4118bc954;p=linux.git 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 Reviewed-by: Stephen Boyd Tested-by: Dave Gerlach Signed-off-by: Rafael J. Wysocki --- diff --git a/drivers/base/power/opp/core.c b/drivers/base/power/opp/core.c index eceebef36f21..35ff06283738 100644 --- a/drivers/base/power/opp/core.c +++ b/drivers/base/power/opp/core.c @@ -1485,7 +1485,7 @@ struct opp_table *dev_pm_opp_set_regulators(struct device *dev, } /* Already have regulators set */ - if (WARN_ON(opp_table->regulators)) { + if (opp_table->regulators) { ret = -EBUSY; goto err; }