From: Takashi Iwai Date: Tue, 29 Nov 2016 21:28:40 +0000 (+0100) Subject: ALSA: usb-audio: Fix bogus error return in snd_usb_create_stream() X-Git-Tag: v3.2.87~176 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?p=pandora-kernel.git;a=commitdiff_plain;h=ff30a48046b82621df8546eae81f3b9d725095ff;ds=sidebyside ALSA: usb-audio: Fix bogus error return in snd_usb_create_stream() commit 4763601a56f155ddf94ef35fc2c41504a2de15f5 upstream. The function returns -EINVAL even if it builds the stream properly. The bogus error code sneaked in during the code refactoring, but it wasn't noticed until now since the returned error code itself is ignored in anyway. Kill it here, but there is no behavior change by this patch, obviously. Fixes: e5779998bf8b ('ALSA: usb-audio: refactor code') Signed-off-by: Takashi Iwai Signed-off-by: Ben Hutchings --- diff --git a/sound/usb/card.c b/sound/usb/card.c index b3ac38991e6e..413b32d6ef35 100644 --- a/sound/usb/card.c +++ b/sound/usb/card.c @@ -207,7 +207,6 @@ static int snd_usb_create_stream(struct snd_usb_audio *chip, int ctrlif, int int if (! snd_usb_parse_audio_interface(chip, interface)) { usb_set_interface(dev, interface, 0); /* reset the current interface */ usb_driver_claim_interface(&usb_audio_driver, iface, (void *)-1L); - return -EINVAL; } return 0;