aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2016-05-04 18:49:55 +0530
committerAlex Shi <alex.shi@linaro.org>2017-03-23 11:37:04 +0800
commitf03ec877840b5fd07db4fb4f76a958de0f38e936 (patch)
tree2ce1d2c0cfe2bd79ed4603a10e9fea0e2f41228a
parent454f12fd0b3fae75d101765614e749e3f70a5078 (diff)
downloadlinux-linaro-stable-v4.4/topic/OPPv2.tar.gz
PM / OPP: Remove useless checkv4.4/topic/OPPv2
Regulators are optional for devices using OPPs and the OPP core shouldn't be printing any errors for such missing regulators. It was fine before the commit 0c717d0f9cb4, but that failed to update this part of the code to remove an 'always true' check and an extra unwanted print message. Fix that now. Fixes: 0c717d0f9cb4 (PM / OPP: Initialize regulator pointer to an error value) Reported-by: Marc Gonzalez <marc_gonzalez@sigmadesigns.com> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Reviewed-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> (cherry picked from commit 21f8a99ce61b2d4b74bd425a5bf7e9efbe162788) Signed-off-by: Alex Shi <alex.shi@linaro.org>
-rw-r--r--drivers/base/power/opp/core.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/base/power/opp/core.c b/drivers/base/power/opp/core.c
index 433b600..d8f4cc2 100644
--- a/drivers/base/power/opp/core.c
+++ b/drivers/base/power/opp/core.c
@@ -259,9 +259,6 @@ unsigned long dev_pm_opp_get_max_volt_latency(struct device *dev)
reg = opp_table->regulator;
if (IS_ERR(reg)) {
/* Regulator may not be required for device */
- if (reg)
- dev_err(dev, "%s: Invalid regulator (%ld)\n", __func__,
- PTR_ERR(reg));
rcu_read_unlock();
return 0;
}