aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSubhransu S. Prusty <subhransu.s.prusty@intel.com>2016-03-14 01:05:06 -0400
committerTakashi Iwai <tiwai@suse.de>2016-03-14 03:30:47 -0400
commit028cb68ee3d01f5323493cb3c07ba92b0acb2f03 (patch)
tree29a147a56dd99e3b80f9154582675082b587780c
parent4061db03dd71d195b9973ee466f6ed32f6a3fc16 (diff)
ALSA: hda - Fixes double fault in nvhdmi_chmap_cea_alloc_validate_get_type
nvhdmi_chmap_cea_alloc_validate_get_type calls itself recursively using chmap ops causing the double fault. Fixed by adding the default validate_get_type handling inside nvdia validate_get_type handler. Link: https://bugzilla.kernel.org/show_bug.cgi?id=114311 Fixes: 67b90cb ("ALSA: hda - Create common chmap object") Reported-by: Andreas Reis <andreas.reis@gmail.com> Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com> Tested-by: Andreas Reis <andreas.reis@gmail.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r--sound/pci/hda/patch_hdmi.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c
index 5fc9ff31b1c5..3fc259154c0b 100644
--- a/sound/pci/hda/patch_hdmi.c
+++ b/sound/pci/hda/patch_hdmi.c
@@ -2836,8 +2836,12 @@ static int nvhdmi_chmap_cea_alloc_validate_get_type(struct hdac_chmap *chmap,
2836 if (cap->ca_index == 0x00 && channels == 2) 2836 if (cap->ca_index == 0x00 && channels == 2)
2837 return SNDRV_CTL_TLVT_CHMAP_FIXED; 2837 return SNDRV_CTL_TLVT_CHMAP_FIXED;
2838 2838
2839 return chmap->ops.chmap_cea_alloc_validate_get_type( 2839 /* If the speaker allocation matches the channel count, it is OK. */
2840 chmap, cap, channels); 2840 if (cap->channels != channels)
2841 return -1;
2842
2843 /* all channels are remappable freely */
2844 return SNDRV_CTL_TLVT_CHMAP_VAR;
2841} 2845}
2842 2846
2843static int nvhdmi_chmap_validate(struct hdac_chmap *chmap, 2847static int nvhdmi_chmap_validate(struct hdac_chmap *chmap,