Skip to content

Commit f03ec87

Browse files
vireshkAlex Shi
authored andcommitted
PM / OPP: Remove useless check
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>
1 parent 454f12f commit f03ec87

1 file changed

Lines changed: 0 additions & 3 deletions

File tree

drivers/base/power/opp/core.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -259,9 +259,6 @@ unsigned long dev_pm_opp_get_max_volt_latency(struct device *dev)
259259
reg = opp_table->regulator;
260260
if (IS_ERR(reg)) {
261261
/* Regulator may not be required for device */
262-
if (reg)
263-
dev_err(dev, "%s: Invalid regulator (%ld)\n", __func__,
264-
PTR_ERR(reg));
265262
rcu_read_unlock();
266263
return 0;
267264
}

0 commit comments

Comments
 (0)