[PATCH 2/2] drm/amdkfd: Failed to check various return code

Kasiviswanathan, Harish Harish.Kasiviswanathan at amd.com
Thu Dec 12 02:13:15 UTC 2024


[Public]

The comment needs to be fixed. This patch is checking if the variable is not null. With that fixed.

Reviewed-by: Harish Kasiviswanathan <Harish.Kasiviswanathan at amd.com>



-----Original Message-----
From: amd-gfx <amd-gfx-bounces at lists.freedesktop.org> On Behalf Of Andrew Martin
Sent: Tuesday, December 10, 2024 1:19 PM
To: amd-gfx at lists.freedesktop.org
Cc: Kuehling, Felix <Felix.Kuehling at amd.com>; Tudor, Alexandru <Alexandru.Tudor at amd.com>; Martin, Andrew <Andrew.Martin at amd.com>; Martin, Andrew <Andrew.Martin at amd.com>
Subject: [PATCH 2/2] drm/amdkfd: Failed to check various return code

Clean up code to quiet the compiler on us failing to check the return
code.

Signed-off-by: Andrew Martin <Andrew.Martin at amd.com>
---
 drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
index 16b5daaa272f..1405e8affd48 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
@@ -2388,6 +2388,9 @@ static int wait_on_destroy_queue(struct device_queue_manager *dqm,
                                                                q->process);
        int ret = 0;

+       if (WARN_ON(!pdd))
+               return ret;
+
        if (pdd->qpd.is_debug)
                return ret;

--
2.43.0



More information about the amd-gfx mailing list