]> git.ipfire.org Git - people/arne_f/kernel.git/commit
ALSA: hda/realtek - Fix Oops in alc_mux_select()
authorTakashi Iwai <tiwai@suse.de>
Fri, 2 Dec 2011 14:29:12 +0000 (15:29 +0100)
committerPaul Gortmaker <paul.gortmaker@windriver.com>
Wed, 16 Jan 2013 21:45:02 +0000 (16:45 -0500)
commit3c49ac0cf82ece4c02784528cdfce7c6748254d2
treec2db53c7d84708152269b1816da5da62a54cd7a6
parent50c8a5c24efdc2b15e2e11f8ce2cbe1284fb933e
ALSA: hda/realtek - Fix Oops in alc_mux_select()

commit cce4aa378a049f4275416ee6302dd24f37b289df upstream.

When no imux is available (e.g. a single capture source),
alc_auto_init_input_src() may trigger an Oops due to the access to -1.
Add a proper zero-check to avoid it.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
[PG: in mainline, 21268961d3 rewrites and creates alc_mux_select, but the
code that needed the check still existed prior to that in alc_mux_enum_put]
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
sound/pci/hda/patch_realtek.c