drm/amdgpu: return an error instead of BUG() for CSA bo_va

If the bo_va is not present, return an error rather than
crashing the kernel.

Reviewed-by: Kent Russell <kent.russell@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Alex Deucher 2026-06-15 18:40:49 -04:00
parent fec62b5e14
commit 9af115ad50

View File

@ -1118,7 +1118,8 @@ static int amdgpu_cs_vm_handling(struct amdgpu_cs_parser *p)
if (fpriv->csa_va) {
bo_va = fpriv->csa_va;
BUG_ON(!bo_va);
if (!bo_va)
return -ENOMEM;
r = amdgpu_vm_bo_update(adev, bo_va, false);
if (r)
return r;