]> www.infradead.org Git - users/hch/misc.git/commitdiff
drm/amdgpu/fence: Remove redundant 0 value initialization
authorLiao Yuanhong <liaoyuanhong@vivo.com>
Tue, 19 Aug 2025 08:25:21 +0000 (16:25 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 27 Aug 2025 17:57:47 +0000 (13:57 -0400)
The amdgpu_fence struct is already zeroed by kzalloc(). It's redundant to
initialize am_fence->context to 0.

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Liao Yuanhong <liaoyuanhong@vivo.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c

index bcb74286a78a1a54d0ce07077183f74d32985400..fd8cca241da6267f0c0d20fff11c3428ef1a9323 100644 (file)
@@ -120,7 +120,6 @@ int amdgpu_fence_emit(struct amdgpu_ring *ring, struct dma_fence **f,
                am_fence = kzalloc(sizeof(*am_fence), GFP_KERNEL);
                if (!am_fence)
                        return -ENOMEM;
-               am_fence->context = 0;
        } else {
                am_fence = af;
        }