Skip to content

Commit

Permalink
PM / OPP: Remove useless check
Browse files Browse the repository at this point in the history
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 0c717d0, 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: 0c717d0 (PM / OPP: Initialize regulator pointer to an error value)
Reported-by: Marc Gonzalez <[email protected]>
Signed-off-by: Viresh Kumar <[email protected]>
Reviewed-by: Stephen Boyd <[email protected]>
Signed-off-by: Rafael J. Wysocki <[email protected]>
  • Loading branch information
vireshk authored and rafaeljw committed May 4, 2016
1 parent 04974df commit 21f8a99
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions drivers/base/power/opp/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 21f8a99

Please sign in to comment.