Commit 9ff2e14c authored by Bob Zhou's avatar Bob Zhou Committed by Alex Deucher

drm/amdgpu: add missing error handling in function amdgpu_gmc_flush_gpu_tlb_pasid

Fix the unchecked return value warning reported by Coverity,
so add error handling.
Signed-off-by: default avatarBob Zhou <bob.zhou@amd.com>
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 94534f41
......@@ -718,7 +718,11 @@ int amdgpu_gmc_flush_gpu_tlb_pasid(struct amdgpu_device *adev, uint16_t pasid,
ndw += kiq->pmf->invalidate_tlbs_size;
spin_lock(&adev->gfx.kiq[inst].ring_lock);
amdgpu_ring_alloc(ring, ndw);
r = amdgpu_ring_alloc(ring, ndw);
if (r) {
spin_unlock(&adev->gfx.kiq[inst].ring_lock);
goto error_unlock_reset;
}
if (adev->gmc.flush_tlb_needs_extra_type_2)
kiq->pmf->kiq_invalidate_tlbs(ring, pasid, 2, all_hub);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment