From: Tom St Denis Date: Wed, 2 Mar 2016 13:58:07 +0000 (-0500) Subject: drm/amd/amdgpu: Don't proceed in audio_fini in DCEv11 if disabled X-Git-Tag: v4.6-rc1~61^2~4^2~22 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=29f646dfb2269fa55d48a8d8c91a42ee64e5e4fc;p=karo-tx-linux.git 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 Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c b/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c index 6e8d74da183f..4501ed0e97c7 100644 --- a/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c +++ b/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;