diff mbox

PM / OPP: Remove useless check

Message ID 080908c24c189b44442b2fee7be83e760a6dac49.1462367990.git.viresh.kumar@linaro.org (mailing list archive)
State Accepted, archived
Delegated to: Rafael Wysocki
Headers show

Commit Message

Viresh Kumar May 4, 2016, 1:19 p.m. UTC
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>
---
 drivers/base/power/opp/core.c | 3 ---
 1 file changed, 3 deletions(-)

Comments

Stephen Boyd May 4, 2016, 6:21 p.m. UTC | #1
On 05/04, Viresh Kumar wrote:
> 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>
Rafael J. Wysocki May 5, 2016, 2 p.m. UTC | #2
On Wednesday, May 04, 2016 11:21:27 AM Stephen Boyd wrote:
> On 05/04, Viresh Kumar wrote:
> > 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>

Applied, thanks!

--
To unsubscribe from this list: send the line "unsubscribe linux-pm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/base/power/opp/core.c b/drivers/base/power/opp/core.c
index 433b60092972..d8f4cc22856c 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;
 	}