Skip to contentSkip to conversation

ALSA: usb-audio: Fix bogus error return in snd_usb_create_stream()

PATCH New Takashi Iwai 1 participant 1 message Nov 29, 2016 Sound

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ALSA: usb-audio: Fix bogus error return in snd_usb_create_stream()

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')
---
 sound/usb/card.c | 1 -
 1 file changed, 1 deletion(-)
sound/usb/card.c +0 -1
index 2ddc034673a8..f36cb068dad3 100644
@@ -206,7 +206,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;
Signature · 1 line
2.10.2