Skip to content

Commit 5394fb2

Browse files
fxkamdalexdeucher
authored andcommitted
drm/amdgpu: Remove unnecessary NULL check
A static checker pointed out, that bo_va->base.bo was already derefenced earlier in the same scope. Therefore this check is unnecessary here. Reported-by: Dan Carpenter <dan.carpenter@linaro.org> Fixes: 50661eb ("drm/amdgpu: Auto-validate DMABuf imports in compute VMs") Reviewed-by: Kent Russell <kent.russell@amd.com> Signed-off-by: Felix Kuehling <felix.kuehling@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent 087a3e1 commit 5394fb2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1477,7 +1477,7 @@ int amdgpu_vm_handle_moved(struct amdgpu_device *adev,
14771477
/* Remember evicted DMABuf imports in compute VMs for later
14781478
* validation
14791479
*/
1480-
if (vm->is_compute_context && bo_va->base.bo &&
1480+
if (vm->is_compute_context &&
14811481
bo_va->base.bo->tbo.base.import_attach &&
14821482
(!bo_va->base.bo->tbo.resource ||
14831483
bo_va->base.bo->tbo.resource->mem_type == TTM_PL_SYSTEM))

0 commit comments

Comments
 (0)