drm/amdkfd: Remove unnecessary condition in kfd_topology_add_device()
authorDan Carpenter <error27@gmail.com>
Fri, 25 Nov 2022 07:39:49 +0000 (10:39 +0300)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 29 Nov 2022 16:03:37 +0000 (11:03 -0500)
We re-arranged this code recently so "ret" is always zero at this point.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Felix Kuehling <Felix.Kuehling@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_topology.c

index 6f01ebc8557be64013ad015a5d43b2bded9d49bf..bceb1a5b25186d71b366f2cc7d672c9b904a97ae 100644 (file)
@@ -2012,10 +2012,9 @@ int kfd_topology_add_device(struct kfd_dev *gpu)
 
        kfd_debug_print_topology();
 
-       if (!res)
-               kfd_notify_gpu_change(gpu_id, 1);
+       kfd_notify_gpu_change(gpu_id, 1);
 
-       return res;
+       return 0;
 }
 
 /**