]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
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 16b5daaa272f13f24bef2d7f11e01270fc3e53ba..1405e8affd4840caaf18e67afe5a723923e0829d 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;