瀏覽代碼

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 年之前
父節點
當前提交
29f646dfb2
共有 1 個文件被更改,包括 3 次插入0 次删除
  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;