Re: [PATCH] drm/simpledrm: Fix power domain device link validity check

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi

Am 11.10.23 um 16:32 schrieb Thierry Reding:
From: Thierry Reding <treding@xxxxxxxxxx>

We need to check if a link is non-NULL before trying to delete it.

Signed-off-by: Thierry Reding <treding@xxxxxxxxxx>

Reviewed-by: Thomas Zimmermann <tzimmermann@xxxxxxx>

I'm going to merge the patch into drm-misc-next with the additional Fixes tag

Fixes: 61df9ca23107 ("drm/simpledrm: Add support for multiple "power-domains"")

Best regards
Thomas


---
  drivers/gpu/drm/tiny/simpledrm.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

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);

--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstrasse 146, 90461 Nuernberg, Germany
GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman
HRB 36809 (AG Nuernberg)

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux