drm/amd/amdgpu: Don't proceed in audio_fini in DCEv11 if disabled
authorTom St Denis <tom.stdenis@amd.com>
Wed, 2 Mar 2016 13:58:07 +0000 (08:58 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 8 Mar 2016 16:01:51 +0000 (11:01 -0500)
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>
drivers/gpu/drm/amd/amdgpu/dce_v11_0.c

index 6e8d74da183f4c422cb959bf023783c4c6bfb3d1..4501ed0e97c7f893a67060192d617fb22a372b86 100644 (file)
@@ -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;