mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] OPP: Fix missing cleanup on error in _opp_attach_genpd()
@ 2024-05-28  5:31 Viresh Kumar
  2024-05-28  6:20 ` Markus Elfring
  0 siblings, 1 reply; 3+ messages in thread
From: Viresh Kumar @ 2024-05-28  5:31 UTC (permalink / raw)
  To: Viresh Kumar, Nishanth Menon, Stephen Boyd, Ulf Hansson
  Cc: Viresh Kumar, linux-pm, Vincent Guittot, Rafael J. Wysocki,
	kernel test robot, Dan Carpenter, linux-kernel

The commit 2a56c462fe5a updated the code mistakenly to return directly
on errors, without doing the required cleanups. Fix it.

Fixes: 2a56c462fe5a ("OPP: Fix required_opp_tables for multiple genpds using same table")
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/r/202405180016.4fbn86bm-lkp@intel.com/
Signed-off-by: Viresh Kumar <viresh.kumar@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 cb4611fe1b5b..4e4d293bf5b1 100644
--- a/drivers/opp/core.c
+++ b/drivers/opp/core.c
@@ -2443,8 +2443,10 @@ static int _opp_attach_genpd(struct opp_table *opp_table, struct device *dev,
 		 * Cross check it again and fix if required.
 		 */
 		gdev = dev_to_genpd_dev(virt_dev);
-		if (IS_ERR(gdev))
-			return PTR_ERR(gdev);
+		if (IS_ERR(gdev)) {
+			ret = PTR_ERR(gdev);
+			goto err;
+		}
 
 		genpd_table = _find_opp_table(gdev);
 		if (!IS_ERR(genpd_table)) {
-- 
2.31.1.272.g89b43f80a514


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] OPP: Fix missing cleanup on error in _opp_attach_genpd()
  2024-05-28  5:31 [PATCH] OPP: Fix missing cleanup on error in _opp_attach_genpd() Viresh Kumar
@ 2024-05-28  6:20 ` Markus Elfring
  2024-05-28  6:23   ` Viresh Kumar
  0 siblings, 1 reply; 3+ messages in thread
From: Markus Elfring @ 2024-05-28  6:20 UTC (permalink / raw)
  To: Viresh Kumar, linux-pm, lkp, Nishanth Menon, Stephen Boyd, Ulf Hansson
  Cc: LKML, Dan Carpenter, Rafael J. Wysocki, Vincent Guittot, Viresh Kumar

> The commit 2a56c462fe5a updated the code mistakenly …

Is there a need to reconsider data for such a commit reference?
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v6.10-rc1#n99

Regards,
Markus

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] OPP: Fix missing cleanup on error in _opp_attach_genpd()
  2024-05-28  6:20 ` Markus Elfring
@ 2024-05-28  6:23   ` Viresh Kumar
  0 siblings, 0 replies; 3+ messages in thread
From: Viresh Kumar @ 2024-05-28  6:23 UTC (permalink / raw)
  To: Markus Elfring
  Cc: linux-pm, lkp, Nishanth Menon, Stephen Boyd, Ulf Hansson, LKML,
	Dan Carpenter, Rafael J. Wysocki, Vincent Guittot, Viresh Kumar

On 28-05-24, 08:20, Markus Elfring wrote:
> > The commit 2a56c462fe5a updated the code mistakenly …
> 
> Is there a need to reconsider data for such a commit reference?
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v6.10-rc1#n99

I didn't add it as it was already there as part of Fixes thing. I will
just drop the commit id from subject while applying to avoid the
duplication.

-- 
viresh

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-05-28  6:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-28  5:31 [PATCH] OPP: Fix missing cleanup on error in _opp_attach_genpd() Viresh Kumar
2024-05-28  6:20 ` Markus Elfring
2024-05-28  6:23   ` Viresh Kumar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®