* [PATCH] drm/simpledrm: Fix power domain device link validity check
@ 2023-10-11 14:32 Thierry Reding
2023-10-12 8:36 ` Thomas Zimmermann
0 siblings, 1 reply; 2+ messages in thread
From: Thierry Reding @ 2023-10-11 14:32 UTC (permalink / raw)
To: Thomas Zimmermann, Javier Martinez Canillas; +Cc: dri-devel
From: Thierry Reding <treding@nvidia.com>
We need to check if a link is non-NULL before trying to delete it.
Signed-off-by: Thierry Reding <treding@nvidia.com>
---
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);
--
2.42.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] drm/simpledrm: Fix power domain device link validity check
2023-10-11 14:32 [PATCH] drm/simpledrm: Fix power domain device link validity check Thierry Reding
@ 2023-10-12 8:36 ` Thomas Zimmermann
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Zimmermann @ 2023-10-12 8:36 UTC (permalink / raw)
To: Thierry Reding, Javier Martinez Canillas; +Cc: dri-devel
[-- Attachment #1.1: Type: text/plain, Size: 1405 bytes --]
Hi
Am 11.10.23 um 16:32 schrieb Thierry Reding:
> From: Thierry Reding <treding@nvidia.com>
>
> We need to check if a link is non-NULL before trying to delete it.
>
> Signed-off-by: Thierry Reding <treding@nvidia.com>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
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 #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-10-12 8:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-11 14:32 [PATCH] drm/simpledrm: Fix power domain device link validity check Thierry Reding
2023-10-12 8:36 ` Thomas Zimmermann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).