ALSA: hda/realtek - Fix Oops in alc_mux_select()
commit2a72a47b80bf4dfbdec91889d1d2c4702f134da5
authorTakashi Iwai <tiwai@suse.de>
Fri, 2 Dec 2011 14:29:12 +0000 (2 15:29 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 21 Dec 2011 20:57:33 +0000 (21 12:57 -0800)
treeac0eff60355aded3d0d4ef4febfba4145e0b9177
parent70df35a3564820865db8ddb1b21ef9f92b5ca95c
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
sound/pci/hda/patch_realtek.c