From: Andrew-sh.Cheng Date: Mon, 20 Jul 2020 08:55:26 +0000 (+0800) Subject: opp: Allow disabled OPPs in dev_pm_opp_get_freq() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=06a8a059e88bd73ee81a4ad19e97c04766f84def;p=linux.git opp: Allow disabled OPPs in dev_pm_opp_get_freq() Allow dev_pm_opp_get_freq() to work for disabled OPPs. Signed-off-by: Andrew-sh.Cheng [ Viresh: Massaged commit log ] Signed-off-by: Viresh Kumar --- diff --git a/drivers/opp/core.c b/drivers/opp/core.c index 864cf4c65fff3..0c8c74a3c868e 100644 --- a/drivers/opp/core.c +++ b/drivers/opp/core.c @@ -118,7 +118,7 @@ EXPORT_SYMBOL_GPL(dev_pm_opp_get_voltage); */ unsigned long dev_pm_opp_get_freq(struct dev_pm_opp *opp) { - if (IS_ERR_OR_NULL(opp) || !opp->available) { + if (IS_ERR_OR_NULL(opp)) { pr_err("%s: Invalid parameters\n", __func__); return 0; }