[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230301134756.999169-2-cyndis@kapsi.fi>
Date: Wed, 1 Mar 2023 15:47:56 +0200
From: Mikko Perttunen <cyndis@...si.fi>
To: Thierry Reding <thierry.reding@...il.com>,
Jonathan Hunter <jonathanh@...dia.com>
Cc: Mikko Perttunen <mperttunen@...dia.com>,
linux-tegra@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH 2/2] soc/tegra: bpmp: Actually free memory on error path
From: Mikko Perttunen <mperttunen@...dia.com>
Within the error path, genpd->domains has not been set, so we need
to pass the domains variable to kfree instead.
Signed-off-by: Mikko Perttunen <mperttunen@...dia.com>
---
drivers/soc/tegra/powergate-bpmp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/soc/tegra/powergate-bpmp.c b/drivers/soc/tegra/powergate-bpmp.c
index 8eaf50d0b6af..179ed895c279 100644
--- a/drivers/soc/tegra/powergate-bpmp.c
+++ b/drivers/soc/tegra/powergate-bpmp.c
@@ -286,7 +286,7 @@ static int tegra_bpmp_add_powergates(struct tegra_bpmp *bpmp,
tegra_powergate_remove(powergate);
}
- kfree(genpd->domains);
+ kfree(domains);
return err;
}
--
2.39.2
Powered by blists - more mailing lists