]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/imagination: Detach pm domains if linking fails
authorMatt Coster <matt.coster@imgtec.com>
Fri, 27 Feb 2026 14:12:48 +0000 (14:12 +0000)
committerMatt Coster <matt.coster@imgtec.com>
Wed, 4 Mar 2026 09:56:21 +0000 (09:56 +0000)
There's a missing call to dev_pm_domain_detach_list() in the error path of
pvr_power_domains_init(); if creating the second stage of device links
fails then the struct dev_pm_domain_list will be left dangling.

Fixes: e19cc5ab347e3 ("drm/imagination: Use dev_pm_domain_attach_list()")
Reviewed-by: Alessio Belle <alessio.belle@imgtec.com>
Link: https://patch.msgid.link/20260227-single-domain-power-fixes-v1-2-d37ba0825f7c@imgtec.com
Signed-off-by: Matt Coster <matt.coster@imgtec.com>
drivers/gpu/drm/imagination/pvr_power.c

index be8018085b2df4b4e86770ed4551088c6133e7cd..5a1fda685f2ce8308366112e5fcd9e030ecc41e3 100644 (file)
@@ -661,6 +661,8 @@ err_unlink:
        while (--i >= 0)
                device_link_del(domain_links[i]);
 
+       dev_pm_domain_detach_list(domains);
+
        return err;
 }