On Tue, Dec 26, 2023 at 5:10 AM Srinivasan Shanmugam <srinivasan.shanmugam@xxxxxxx> wrote: > > 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. > > Suggested-by: Lijo Lazar <lijo.lazar@xxxxxxx> > Cc: Monk Liu <Monk.Liu@xxxxxxx> > Cc: Christian König <christian.koenig@xxxxxxx> > Cc: Alex Deucher <alexander.deucher@xxxxxxx> > Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmugam@xxxxxxx> Reviewed-by: Alex Deucher <alexander.deucher@xxxxxxx> > --- > v2: > release fw needs to be done only FIJI ASIC (Lijo) > > drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c > index 4b694696930e..33f37efaf373 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c > @@ -1544,6 +1544,7 @@ bool amdgpu_device_need_post(struct amdgpu_device *adev) > return true; > > fw_ver = *((uint32_t *)adev->pm.fw->data + 69); > + release_firmware(adev->pm.fw); > if (fw_ver < 0x00160e00) > return true; > } > -- > 2.34.1 >