]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/amdkfd: remove logically dead code
authorJesse Zhang <jesse.zhang@amd.com>
Thu, 30 May 2024 06:07:30 +0000 (14:07 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 5 Jun 2024 15:25:14 +0000 (11:25 -0400)
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 <Jesse.Zhang@amd.com>
Reviewed-by: Felix Kuehling <felix.kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdkfd/kfd_chardev.c

index fdf171ad4a3c6b5b293e691a0baa7269a0de0705..32e5db509560eec6ddd538e37d8501a6be17b71b 100644 (file)
@@ -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;