ALSA: hda/realtek - Fix Oops in alc_mux_select()
commit0f215d5b6bfd70c926569b41e696a35c54fd7bd3
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 21:04:50 +0000 (21 13:04 -0800)
treedc7110bce32ea26c4b3d765d1786abe7996e25de
parentd21de8b14ac52b2be0b86435a966aa8e568f853e
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