Skip to content

Commit 48974fd

Browse files
storulfmehmetb0
authored andcommitted
pmdomain: core: Add missing put_device()
BugLink: https://bugs.launchpad.net/bugs/2096827 [ Upstream commit b8f7bbd ] 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: 401ea15 ("PM / Domain: Add struct device to genpd") Cc: [email protected] Signed-off-by: Ulf Hansson <[email protected]> Message-ID: <[email protected]> Stable-dep-of: 3e3b71d ("pmdomain: core: Fix error path in pm_genpd_init() when ida alloc fails") Signed-off-by: Sasha Levin <[email protected]> Signed-off-by: Koichiro Den <[email protected]>
1 parent 6ee8784 commit 48974fd

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/pmdomain/core.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2140,6 +2140,7 @@ static int genpd_alloc_data(struct generic_pm_domain *genpd)
21402140

21412141
static void genpd_free_data(struct generic_pm_domain *genpd)
21422142
{
2143+
put_device(&genpd->dev);
21432144
if (genpd_is_cpu_domain(genpd))
21442145
free_cpumask_var(genpd->cpus);
21452146
if (genpd->free_states)

0 commit comments

Comments
 (0)