drm/amdkfd: remove logically dead code
Subsystems (3)
PATCH 11/12 drm/amdkfd: remove logically dead code
idr_for_each_entry can ensure that mem is not empty during the loop. So don't need check mem again.
Signed-off-by Jesse Zhang <[email protected]>
--- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 5 ----- 1 file changed, 5 deletions(-)
drivers/gpu/drm/amd/amdkfd/kfd_chardev.c +0 -5
@@ -1913,11 +1913,6 @@ static int criu_checkpoint_bos(struct kfd_process *p,struct kfd_criu_bo_priv_data *bo_priv;int i, dev_idx =0 ; -if (!mem) { - ret = -ENOMEM ; - goto exit; - } - kgd_mem = (struct kgd_mem *)mem; dumper_bo = kgd_mem->bo;
Signature · 1 line
2.25.1
Quoted 4 lines · Jesse Zhang
idr_for_each_entrycan ensure that mem is not empty during the loop. So don't need check mem again.Signed-off-by Jesse Zhang <[email protected]>
Reviewed-by Felix Kuehling <[email protected]>
Quoted 20 lines
--- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 5 ----- 1 file changed, 5 deletions(-)drivers/gpu/drm/amd/amdkfd/kfd_chardev.c +0
-5@@ -1913,11 +1913,6 @@ static int criu_checkpoint_bos(struct kfd_process *p,struct kfd_criu_bo_priv_data *bo_priv;int i, dev_idx =0 ; -if (!mem) { - ret = -ENOMEM ; - goto exit; - } - kgd_mem = (struct kgd_mem *)mem; dumper_bo = kgd_mem->bo;