From: Dan Carpenter <dan.carpenter@linaro.org>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: Viresh Kumar <vireshk@kernel.org>, Nishanth Menon <nm@ti.com>,
Stephen Boyd <sboyd@kernel.org>,
linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: [PATCH next] OPP: core: Fix loop in dev_pm_opp_sync_regulators()
Date: Wed, 30 Apr 2025 11:07:20 +0300 [thread overview]
Message-ID: <aBHaOOE8xHTsMap2@stanley.mountain> (raw)
We accidentally deleted the if statement in this loop during a cleanup.
Add it back.
Fixes: 5330d0dab736 ("OPP: Define and use scope-based cleanup helpers")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
drivers/opp/core.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/opp/core.c b/drivers/opp/core.c
index fc9874946453..f56ddae35ef2 100644
--- a/drivers/opp/core.c
+++ b/drivers/opp/core.c
@@ -2889,7 +2889,7 @@ int dev_pm_opp_sync_regulators(struct device *dev)
{
struct opp_table *opp_table __free(put_opp_table);
struct regulator *reg;
- int i;
+ int i, ret;
/* Device may not have OPP table */
opp_table = _find_opp_table(dev);
@@ -2906,7 +2906,9 @@ int dev_pm_opp_sync_regulators(struct device *dev)
for (i = 0; i < opp_table->regulator_count; i++) {
reg = opp_table->regulators[i];
- return regulator_sync_voltage(reg);
+ ret = regulator_sync_voltage(reg);
+ if (ret)
+ return ret;
}
return 0;
--
2.47.2
next reply other threads:[~2025-04-30 8:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-30 8:07 Dan Carpenter [this message]
2025-04-30 8:46 ` [PATCH next] OPP: core: Fix loop in dev_pm_opp_sync_regulators() Viresh Kumar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aBHaOOE8xHTsMap2@stanley.mountain \
--to=dan.carpenter@linaro.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=nm@ti.com \
--cc=sboyd@kernel.org \
--cc=viresh.kumar@linaro.org \
--cc=vireshk@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox