]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
ALSA: hda - Return the error from get_wcaps_type() for invalid NIDs
authorTakashi Iwai <tiwai@suse.de>
Tue, 10 Jan 2012 11:41:22 +0000 (12:41 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 25 Jan 2012 21:53:18 +0000 (13:53 -0800)
commit2f4dc284270777873576ecdcc509b7bd69735e27
tree7ee4d3e4bc7c801ac9658a789ca7bddcea2544be
parentd2ffd5c6c75a3cf01f7712aa7035834858f19185
ALSA: hda - Return the error from get_wcaps_type() for invalid NIDs

commit 3a90274de3548ebb2aabfbf488cea8e275a73dc6 upstream.

When an invalid NID is given, get_wcaps() returns zero as the error,
but get_wcaps_type() takes it as the normal value and returns a bogus
AC_WID_AUD_OUT value.  This confuses the parser.

With this patch, get_wcaps_type() returns -1 when value 0 is given,
i.e. an invalid NID is passed to get_wcaps().

Bugzilla: https://bugzilla.novell.com/show_bug.cgi?id=740118

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
sound/pci/hda/hda_local.h
sound/pci/hda/hda_proc.c