diff options
| author | Jiangshan Yi <yijiangshan@kylinos.cn> | 2026-09-09 17:37:28 +0800 |
|---|---|---|
| committer | Alex Deucher <alexander.deucher@amd.com> | 2026-09-10 12:11:25 -0400 |
| commit | a5b30640a0550d55485c21dfe68efd1fbadf5feb (patch) | |
| tree | a0c4c8194503ef3f129e5fa65e083821360e36d7 | |
| parent | 89deab1c9c0d325f3386ef99aeeb28e3cea34d49 (diff) | |
| download | linux-next-a5b30640a0550d55485c21dfe68efd1fbadf5feb.tar.gz linux-next-a5b30640a0550d55485c21dfe68efd1fbadf5feb.zip | |
drm/amdgpu: remove redundant NULL check in amdgpu_cs_vm_handling
bo_va is assigned from fpriv->csa_va, which is already verified to be
non-NULL by the surrounding if statement. The inner NULL check can
therefore never trigger and is dead code, so remove it.
Signed-off-by: Jiangshan Yi <yijiangshan@kylinos.cn>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c index 09c4d664d2b9..1745e500fd80 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c @@ -1146,8 +1146,6 @@ static int amdgpu_cs_vm_handling(struct amdgpu_cs_parser *p) if (fpriv->csa_va) { bo_va = fpriv->csa_va; - if (!bo_va) - return -ENOMEM; r = amdgpu_vm_bo_update(adev, bo_va, false); if (r) return r; |
