drm/amdkfd: Failed to check various return code
authorAndrew Martin <Andrew.Martin@amd.com>
Tue, 10 Dec 2024 16:50:13 +0000 (11:50 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 18 Dec 2024 17:18:11 +0000 (12:18 -0500)
This patch checks and warns if pdd is NULL.

Signed-off-by: Andrew Martin <Andrew.Martin@amd.com>
Reviewed-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c

index 16b5daa..1405e8a 100644 (file)
@@ -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;