diff options
| author | Thierry Reding <[email protected]> | 2023-10-11 16:32:30 +0200 |
|---|---|---|
| committer | Thomas Zimmermann <[email protected]> | 2023-10-12 10:39:48 +0200 |
| commit | c395c83aafbb9cdbe4230f044d5b8eaf9080c0c5 (patch) | |
| tree | e28bc6396f0ef5ab219dcb0bc3d5bff86c8f11c9 /drivers/gpu/drm/tiny/simpledrm.c | |
| parent | b9f29205c0182a2059b4dfa2883db5ef423574d4 (diff) | |
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: 61df9ca23107 ("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]
Diffstat (limited to 'drivers/gpu/drm/tiny/simpledrm.c')
| -rw-r--r-- | drivers/gpu/drm/tiny/simpledrm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/tiny/simpledrm.c b/drivers/gpu/drm/tiny/simpledrm.c index 9c597461d1e2..8bdaf66044fc 100644 --- a/drivers/gpu/drm/tiny/simpledrm.c +++ b/drivers/gpu/drm/tiny/simpledrm.c @@ -506,7 +506,7 @@ static void simpledrm_device_detach_genpd(void *res) return; for (i = sdev->pwr_dom_count - 1; i >= 0; i--) { - if (!sdev->pwr_dom_links[i]) + if (sdev->pwr_dom_links[i]) device_link_del(sdev->pwr_dom_links[i]); if (!IS_ERR_OR_NULL(sdev->pwr_dom_devs[i])) dev_pm_domain_detach(sdev->pwr_dom_devs[i], true); |