opp: Fix early exit from dev_pm_opp_register_set_opp_helper()
authorViresh Kumar <viresh.kumar@linaro.org>
Tue, 20 Oct 2020 10:33:15 +0000 (16:03 +0530)
committerViresh Kumar <viresh.kumar@linaro.org>
Tue, 27 Oct 2020 05:08:28 +0000 (10:38 +0530)
We returned earlier by mistake even when there were no failures. Fix it.

Fixes: dd461cd9183f ("opp: Allow dev_pm_opp_get_opp_table() to return -EPROBE_DEFER")
Reported-by: Naresh Kamboju <naresh.kamboju@linaro.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Tested-by: Naresh Kamboju <naresh.kamboju@linaro.com>
drivers/opp/core.c

index 2483e76..4ac4e7c 100644 (file)
@@ -1930,7 +1930,7 @@ struct opp_table *dev_pm_opp_register_set_opp_helper(struct device *dev,
                return ERR_PTR(-EINVAL);
 
        opp_table = dev_pm_opp_get_opp_table(dev);
-       if (!IS_ERR(opp_table))
+       if (IS_ERR(opp_table))
                return opp_table;
 
        /* This should be called before OPPs are initialized */