summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/fiji_dpm.c
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2016-06-01 11:09:01 -0400
committerAlex Deucher <alexander.deucher@amd.com>2016-06-09 10:48:56 -0400
commit768c95e70c4bd33b3da32a15dd33486246f4ca79 (patch)
tree91f007ea811d55cd161fcd14a1f4932cbde5308b /drivers/gpu/drm/amd/amdgpu/fiji_dpm.c
parenta6dcfd9cc55432e4dcbe058d6ae9f07fb3452992 (diff)
downloadlinux-768c95e70c4bd33b3da32a15dd33486246f4ca79.tar.gz
linux-768c95e70c4bd33b3da32a15dd33486246f4ca79.tar.bz2
linux-768c95e70c4bd33b3da32a15dd33486246f4ca79.zip
drm/amdgpu: fix fw leak in non-powerplay dpm code
We need to release the firmware on driver tear down. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/fiji_dpm.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/fiji_dpm.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/fiji_dpm.c b/drivers/gpu/drm/amd/amdgpu/fiji_dpm.c
index 245cabf06575..ed03b75175d4 100644
--- a/drivers/gpu/drm/amd/amdgpu/fiji_dpm.c
+++ b/drivers/gpu/drm/amd/amdgpu/fiji_dpm.c
@@ -72,6 +72,11 @@ static int fiji_dpm_sw_init(void *handle)
static int fiji_dpm_sw_fini(void *handle)
{
+ struct amdgpu_device *adev = (struct amdgpu_device *)handle;
+
+ release_firmware(adev->pm.fw);
+ adev->pm.fw = NULL;
+
return 0;
}