summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlf Hansson <ulf.hansson@linaro.org>2024-11-22 14:42:02 +0100
committerUlf Hansson <ulf.hansson@linaro.org>2024-12-02 17:06:09 +0100
commitb8f7bbd1f4ecff6d6277b8c454f62bb0a1c6dbe4 (patch)
tree7e4bf94b4fd59f65d93675719813e6a5aef1c178
parentf00582aa4a449dbaefa8df9bb5f3b713928e5a1b (diff)
downloadlwn-b8f7bbd1f4ecff6d6277b8c454f62bb0a1c6dbe4.tar.gz
lwn-b8f7bbd1f4ecff6d6277b8c454f62bb0a1c6dbe4.zip
pmdomain: core: Add missing put_device()
When removing a genpd we don't clean up the genpd->dev correctly. Let's add the missing put_device() in genpd_free_data() to fix this. Fixes: 401ea1572de9 ("PM / Domain: Add struct device to genpd") Cc: stable@vger.kernel.org Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Message-ID: <20241122134207.157283-2-ulf.hansson@linaro.org>
-rw-r--r--drivers/pmdomain/core.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/pmdomain/core.c b/drivers/pmdomain/core.c
index a6c8b85dd024..4d8b0d18bb4a 100644
--- a/drivers/pmdomain/core.c
+++ b/drivers/pmdomain/core.c
@@ -2183,6 +2183,7 @@ free:
static void genpd_free_data(struct generic_pm_domain *genpd)
{
+ put_device(&genpd->dev);
if (genpd_is_cpu_domain(genpd))
free_cpumask_var(genpd->cpus);
if (genpd->free_states)