drm/amdgpu: clean up the amdgpu_cs_parser_bos
authorSunil Khatri <sunil.khatri@amd.com>
Tue, 3 Feb 2026 06:39:05 +0000 (12:09 +0530)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 5 Feb 2026 22:24:33 +0000 (17:24 -0500)
commitf025a2b8d93358467b8e8f4b3a617e88c5f02fab
tree339b8c5feca46a4680f04eef287fed9bd06001b6
parent3b948dd0366a0b64c02e4ed1aefdf7825942e803
drm/amdgpu: clean up the amdgpu_cs_parser_bos

In low memory conditions, kmalloc can fail. In such conditions
unlock the mutex for a clean exit.

We do not need to amdgpu_bo_list_put as it's been handled in the
amdgpu_cs_parser_fini.

Fixes: 737da5363cc0 ("drm/amdgpu: update the functions to use amdgpu version of hmm")
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/r/202602030017.7E0xShmH-lkp@intel.com/
Signed-off-by: Sunil Khatri <sunil.khatri@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c