mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 10:31:46 +09:00
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: 401ea1572d ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
10d40c46db
commit
da719022a4
@@ -2012,6 +2012,7 @@ free:
|
|||||||
|
|
||||||
static void genpd_free_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))
|
if (genpd_is_cpu_domain(genpd))
|
||||||
free_cpumask_var(genpd->cpus);
|
free_cpumask_var(genpd->cpus);
|
||||||
if (genpd->free_states)
|
if (genpd->free_states)
|
||||||
|
|||||||
Reference in New Issue
Block a user