drm/amdkfd: Cleanup KFD nodes creation
authorPhilip Yang <Philip.Yang@amd.com>
Tue, 24 Jan 2023 15:10:14 +0000 (10:10 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 9 Jun 2023 13:52:33 +0000 (09:52 -0400)
commit8c45a8340dd097ea0d6be6f718c4882283d9645d
tree415e1189017ec791a22ee47c41d63314e5173536
parent4482d3c94d7f1d6912521e6de23bb051bfcd084d
drm/amdkfd: Cleanup KFD nodes creation

kfd node allocation outside kfd->num_nodes loop is not needed and causes
memory leak because kfd->num_nodes is at least equal to 1.

Signed-off-by: Philip Yang <Philip.Yang@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_device.c