[Public] The comment needs to be fixed. This patch is checking if the variable is not null. With that fixed.
Reviewed-by: Harish Kasiviswanathan <[email protected]> -----Original Message----- From: amd-gfx <[email protected]> On Behalf Of Andrew Martin Sent: Tuesday, December 10, 2024 1:19 PM To: [email protected] Cc: Kuehling, Felix <[email protected]>; Tudor, Alexandru <[email protected]>; Martin, Andrew <[email protected]>; Martin, Andrew <[email protected]> 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 <[email protected]> --- 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
