[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <e7e9f887328c06800a79f3b48feb623fd15aa3d5.1598261323.git.viresh.kumar@linaro.org>
Date: Mon, 24 Aug 2020 15:00:03 +0530
From: Viresh Kumar <viresh.kumar@...aro.org>
To: stable@...r.kernel.org, Viresh Kumar <vireshk@...nel.org>,
Nishanth Menon <nm@...com>, Stephen Boyd <sboyd@...nel.org>,
Rajendra Nayak <rnayak@...eaurora.org>
Cc: Viresh Kumar <viresh.kumar@...aro.org>,
Stephen Boyd <swboyd@...omium.org>, linux-pm@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH - for v5.7 stable] opp: Put opp table in dev_pm_opp_set_rate() for empty tables
From: Stephen Boyd <swboyd@...omium.org>
commit 8979ef70850eb469e1094279259d1ef393ffe85f upstream.
We get the opp_table pointer at the top of the function and so we should
put the pointer at the end of the function like all other exit paths
from this function do.
Cc: v5.7+ <stable@...r.kernel.org> # v5.7+
Fixes: aca48b61f963 ("opp: Manage empty OPP tables with clk handle")
Reviewed-by: Rajendra Nayak <rnayak@...eaurora.org>
Signed-off-by: Stephen Boyd <swboyd@...omium.org>
[ Viresh: Split the patch into two ]
Signed-off-by: Viresh Kumar <viresh.kumar@...aro.org>
[ Viresh: Update the code for v5.7-stable ]
Signed-off-by: Viresh Kumar <viresh.kumar@...aro.org>
---
drivers/opp/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/opp/core.c b/drivers/opp/core.c
index bb7060d52eec..c94e725e6522 100644
--- a/drivers/opp/core.c
+++ b/drivers/opp/core.c
@@ -820,7 +820,7 @@ int dev_pm_opp_set_rate(struct device *dev, unsigned long target_freq)
if (opp_table->required_opp_tables) {
ret = _set_required_opps(dev, opp_table, NULL);
} else if (!_get_opp_count(opp_table)) {
- return 0;
+ ret = 0;
} else {
dev_err(dev, "target frequency can't be 0\n");
ret = -EINVAL;
--
2.25.0.rc1.19.g042ed3e048af
Powered by blists - more mailing lists