]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/amdkfd: clean up the code to free hmm_range
authorSunil Khatri <sunil.khatri@amd.com>
Tue, 28 Oct 2025 08:19:24 +0000 (13:49 +0530)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 4 Nov 2025 16:33:53 +0000 (11:33 -0500)
commitc0de552910bbd9e49568c1052e00ed118712152a
treeb7332c676912b942973b2233186aad3dc3bab92d
parentf67d54e96bc9e4e20a927868f02c2e9d1aa09751
drm/amdkfd: clean up the code to free hmm_range

a. hmm_range is either NULL or a valid pointer so we
do not need to set range to NULL ever.

b. keep the hmm_range_free in the end irrespective of
the other conditions to avoid some additional checks
and also avoid double free issue.

Signed-off-by: Sunil Khatri <sunil.khatri@amd.com>
Reviewed-by: Felix Kuehling <felix.kuehling@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdkfd/kfd_svm.c