Skip to content

Commit c395c83

Browse files
thierryredingThomas Zimmermann
authored andcommitted
drm/simpledrm: Fix power domain device link validity check
We need to check if a link is non-NULL before trying to delete it. Fixes: 61df9ca ("drm/simpledrm: Add support for multiple "power-domains"") Signed-off-by: Thierry Reding <[email protected]> Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Thomas Zimmermann <[email protected]> Cc: Janne Grunau <[email protected]> Cc: Eric Curtin <[email protected]> Cc: Neal Gompa <[email protected]> Cc: Sven Peter <[email protected]> Cc: Javier Martinez Canillas <[email protected]> Cc: [email protected] Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent b9f2920 commit c395c83

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpu/drm/tiny/simpledrm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,7 @@ static void simpledrm_device_detach_genpd(void *res)
506506
return;
507507

508508
for (i = sdev->pwr_dom_count - 1; i >= 0; i--) {
509-
if (!sdev->pwr_dom_links[i])
509+
if (sdev->pwr_dom_links[i])
510510
device_link_del(sdev->pwr_dom_links[i]);
511511
if (!IS_ERR_OR_NULL(sdev->pwr_dom_devs[i]))
512512
dev_pm_domain_detach(sdev->pwr_dom_devs[i], true);

0 commit comments

Comments
 (0)