Skip to content

Commit da71902

Browse files
storulfgregkh
authored andcommitted
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: 401ea15 ("PM / Domain: Add struct device to genpd") Cc: [email protected] Signed-off-by: Ulf Hansson <[email protected]> Message-ID: <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
1 parent 10d40c4 commit da71902

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/base/power/domain.c

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

20132013
static void genpd_free_data(struct generic_pm_domain *genpd)
20142014
{
2015+
put_device(&genpd->dev);
20152016
if (genpd_is_cpu_domain(genpd))
20162017
free_cpumask_var(genpd->cpus);
20172018
if (genpd->free_states)

0 commit comments

Comments
 (0)