Skip to content

Commit b8f7bbd

Browse files
committed
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: 401ea15 ("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>
1 parent f00582a commit b8f7bbd

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
@@ -2183,6 +2183,7 @@ static int genpd_alloc_data(struct generic_pm_domain *genpd)
21832183

21842184
static void genpd_free_data(struct generic_pm_domain *genpd)
21852185
{
2186+
put_device(&genpd->dev);
21862187
if (genpd_is_cpu_domain(genpd))
21872188
free_cpumask_var(genpd->cpus);
21882189
if (genpd->free_states)

0 commit comments

Comments
 (0)