This is a note to let you know that I've just added the patch titled pmdomain: core: Add missing put_device() to the 6.12-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: pmdomain-core-add-missing-put_device.patch and it can be found in the queue-6.12 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. commit d66c41888ac28651d49d8c437ea790cfd439238c Author: Ulf Hansson <ulf.hansson@xxxxxxxxxx> Date: Fri Nov 22 14:42:02 2024 +0100 pmdomain: core: Add missing put_device() [ Upstream commit b8f7bbd1f4ecff6d6277b8c454f62bb0a1c6dbe4 ] 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@xxxxxxxxxxxxxxx Signed-off-by: Ulf Hansson <ulf.hansson@xxxxxxxxxx> Message-ID: <20241122134207.157283-2-ulf.hansson@xxxxxxxxxx> Stable-dep-of: 3e3b71d35a02 ("pmdomain: core: Fix error path in pm_genpd_init() when ida alloc fails") Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx> diff --git a/drivers/pmdomain/core.c b/drivers/pmdomain/core.c index 29ad510e881c3..e330490d8d7c8 100644 --- a/drivers/pmdomain/core.c +++ b/drivers/pmdomain/core.c @@ -2182,6 +2182,7 @@ static int genpd_alloc_data(struct generic_pm_domain *genpd) 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)