drm/amdgpu: Release 'adev->pm.fw' before return in 'amdgpu_device_need_post()'
authorSrinivasan Shanmugam <srinivasan.shanmugam@amd.com>
Thu, 21 Dec 2023 12:43:11 +0000 (18:13 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 5 Feb 2024 20:14:33 +0000 (20:14 +0000)
commit25c2de1fbd8ee13008791a3c131f5fed02b3ccec
treea5767b99f2643404a0818f8f764006f989f4682f
parentb02831b8a5b687138df4662ff914aa3defc2499e
drm/amdgpu: Release 'adev->pm.fw' before return in 'amdgpu_device_need_post()'

[ Upstream commit 8a44fdd3cf91debbd09b43bd2519ad2b2486ccf4 ]

In function 'amdgpu_device_need_post(struct amdgpu_device *adev)' -
'adev->pm.fw' may not be released before return.

Using the function release_firmware() to release adev->pm.fw.

Thus fixing the below:
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:1571 amdgpu_device_need_post() warn: 'adev->pm.fw' from request_firmware() not released on lines: 1554.

Cc: Monk Liu <Monk.Liu@amd.com>
Cc: Christian König <christian.koenig@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com>
Suggested-by: Lijo Lazar <lijo.lazar@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c