From: Ulf Hansson Date: Fri, 22 Nov 2024 13:42:02 +0000 (+0100) Subject: pmdomain: core: Add missing put_device() X-Git-Tag: v6.13-rc2~20^2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b8f7bbd1f4ec;p=thirdparty%2Fkernel%2Flinux.git 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 Message-ID: <20241122134207.157283-2-ulf.hansson@linaro.org> --- diff --git a/drivers/pmdomain/core.c b/drivers/pmdomain/core.c index a6c8b85dd0247..4d8b0d18bb4a4 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)