]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ALSA: snd-usb: mixer: ignore -EINVAL in snd_usb_mixer_controls()
authorDaniel Mack <zonque@gmail.com>
Tue, 19 Mar 2013 20:09:25 +0000 (21:09 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Mar 2013 19:17:31 +0000 (12:17 -0700)
commit8c15d55f4636bcdcab86005ba5c134646b2dea49
treec0a21b7dc0b035458f65e638ca0a6c79077297c6
parent45e2454fc35e2aca329ddd1df147a791d52d2157
ALSA: snd-usb: mixer: ignore -EINVAL in snd_usb_mixer_controls()

commit 83ea5d18d74f032a760fecde78c0210f66f7f70c upstream.

Creation of individual mixer controls may fail, but that shouldn't cause
the entire mixer creation to fail. Even worse, if the mixer creation
fails, that will error out the entire device probing.

All the functions called by parse_audio_unit() should return -EINVAL if
they find descriptors that are unsupported or believed to be malformed,
so we can safely handle this error code as a non-fatal condition in
snd_usb_mixer_controls().

That fixes a long standing bug which is commonly worked around by
adding quirks which make the driver ignore entire interfaces. Some of
them might now be unnecessary.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Reported-and-tested-by: Rodolfo Thomazelli <pe.soberbo@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/usb/mixer.c