summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu
diff options
context:
space:
mode:
authorAndrew Martin <andrew.martin@amd.com>2025-12-12 15:59:17 +0800
committerAlex Deucher <alexander.deucher@amd.com>2026-02-19 12:16:11 -0500
commit09da66f139b43c217e22435d6e50b0d9960f5183 (patch)
treed03a9f96ca13fc62e0bf304aa0b27bfd2deadf6c /drivers/gpu/drm/amd/amdgpu
parentf0157ce46cf0e5e2257e19d590c9b16036ce26d4 (diff)
drm/amdkfd: Check for NULL return values
This patch fixes issues when the code moves forward with a potential NULL pointer, without checking. Removed one redundant NULL check for a function parameter. This check is already done in the only caller. Signed-off-by: Andrew Martin <andrew.martin@amd.com> Reviewed-by: Felix Kuehling <felix.kuehling@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_fence.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_fence.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_fence.c
index 193ed8becab8..31b8fa52b42f 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_fence.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_fence.c
@@ -107,7 +107,7 @@ static const char *amdkfd_fence_get_timeline_name(struct dma_fence *f)
{
struct amdgpu_amdkfd_fence *fence = to_amdgpu_amdkfd_fence(f);
- return fence->timeline_name;
+ return fence ? fence->timeline_name : NULL;
}
/**