mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-05 15:49:42 -04:00
drm/amd: fix the warning unchecking return vaule for sdma_v7
check ring allocate success before emit preempt ib Signed-off-by: Jesse Zhang <Jesse.Zhang@amd.com> Reviewed-by: Tim Huang <Tim.Huang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
committed by
Alex Deucher
parent
b55bf19eb9
commit
f0574a56fb
@@ -1347,7 +1347,11 @@ static int sdma_v7_0_ring_preempt_ib(struct amdgpu_ring *ring)
|
||||
|
||||
/* emit the trailing fence */
|
||||
ring->trail_seq += 1;
|
||||
amdgpu_ring_alloc(ring, 10);
|
||||
r = amdgpu_ring_alloc(ring, 10);
|
||||
if (r) {
|
||||
DRM_ERROR("ring %d failed to be allocated \n", ring->idx);
|
||||
return r;
|
||||
}
|
||||
sdma_v7_0_ring_emit_fence(ring, ring->trail_fence_gpu_addr,
|
||||
ring->trail_seq, 0);
|
||||
amdgpu_ring_commit(ring);
|
||||
|
||||
Reference in New Issue
Block a user