]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
OPP: Return error on error from dev_pm_opp_get_opp_count()
authorViresh Kumar <viresh.kumar@linaro.org>
Wed, 3 Oct 2018 09:52:03 +0000 (15:22 +0530)
committerViresh Kumar <viresh.kumar@linaro.org>
Thu, 4 Oct 2018 03:40:56 +0000 (09:10 +0530)
Return error number instead of 0 on failures.

Fixes: a1e8c13600bf ("PM / OPP: "opp-hz" is optional for power domains")
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
drivers/opp/core.c

index cdf918aaac34ad60a53bfae019e2b1ea6527a9de..2c2df4e4fc14db27e6d2f5f938ff6300e43e9412 100644 (file)
@@ -318,7 +318,7 @@ int dev_pm_opp_get_opp_count(struct device *dev)
                count = PTR_ERR(opp_table);
                dev_dbg(dev, "%s: OPP table not found (%d)\n",
                        __func__, count);
-               return 0;
+               return count;
        }
 
        count = _get_opp_count(opp_table);