Browse Source

drm/amd/amdgpu: Don't proceed in audio_fini in DCEv11 if disabled

If amdgpu_audio is disabled then the audio structure is not initialized
so we shouldn't read it in the fini function.

Signed-off-by: Tom St Denis <tom.stdenis@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Tom St Denis 9 years ago
parent
commit
29f646dfb2
1 changed files with 3 additions and 0 deletions
  1. 3 0
      drivers/gpu/drm/amd/amdgpu/dce_v11_0.c

+ 3 - 0
drivers/gpu/drm/amd/amdgpu/dce_v11_0.c

@@ -1658,6 +1658,9 @@ static void dce_v11_0_audio_fini(struct amdgpu_device *adev)
 {
 	int i;
 
+	if (!amdgpu_audio)
+		return;
+
 	if (!adev->mode_info.audio.enabled)
 		return;