From: Viresh Kumar Date: Wed, 3 Oct 2018 09:52:03 +0000 (+0530) Subject: OPP: Return error on error from dev_pm_opp_get_opp_count() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=09f662f95306f3e3d47ab6842bc4b0bb868a80ad;p=linux.git OPP: Return error on error from dev_pm_opp_get_opp_count() Return error number instead of 0 on failures. Fixes: a1e8c13600bf ("PM / OPP: "opp-hz" is optional for power domains") Signed-off-by: Viresh Kumar --- diff --git a/drivers/opp/core.c b/drivers/opp/core.c index cdf918aaac34a..2c2df4e4fc14d 100644 --- a/drivers/opp/core.c +++ b/drivers/opp/core.c @@ -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);