drm/amdgpu/sdma: add missing release_firmware() in amdgpu_sdma_init_microcode()
authorYang Yingliang <yangyingliang@huawei.com>
Thu, 29 Sep 2022 14:20:15 +0000 (22:20 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 6 Oct 2022 16:05:01 +0000 (12:05 -0400)
commit525530ad9a7ec9aa34266e1429cc5ef9acb58e6c
tree4988d05f91af80af79f71539ceeed340083b8d5a
parent8c39634d28fa460869702b9801d2efe06671b342
drm/amdgpu/sdma: add missing release_firmware() in amdgpu_sdma_init_microcode()

In some error path in amdgpu_sdma_init_microcode(), release_firmware() is
not called, the memory allocated in request_firmware() will be leaked,
calling amdgpu_sdma_destroy_inst_ctx() which calls release_firmware() to
avoid memory leak.

Fixes: 15aa13056d11da ("drm/amdgpu: add function to init SDMA microcode")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c