]> Git Repo - linux.git/commitdiff
PM / OPP: Remove useless check
authorViresh Kumar <[email protected]>
Wed, 4 May 2016 13:19:55 +0000 (18:49 +0530)
committerRafael J. Wysocki <[email protected]>
Wed, 4 May 2016 23:42:19 +0000 (01:42 +0200)
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 <[email protected]>
Signed-off-by: Viresh Kumar <[email protected]>
Reviewed-by: Stephen Boyd <[email protected]>
Signed-off-by: Rafael J. Wysocki <[email protected]>
drivers/base/power/opp/core.c

index 433b60092972d56abba55897158d6c22156cf631..d8f4cc22856c924b1be7bf1aa97f175b6579c554 100644 (file)
@@ -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;
        }
This page took 0.060995 seconds and 4 git commands to generate.