Skip to contentSkip to conversation

ALSA: usb-audio: Handle the error from snd_usb_mixer_apply_create_quirk()

PATCH New Takashi Iwai 1 participant 1 message Apr 24, 2019 Sound

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ALSA: usb-audio: Handle the error from snd_usb_mixer_apply_create_quirk()

The error from snd_usb_mixer_apply_create_quirk() is ignored in the current usb-audio driver code, which will continue the probing even after the error. Let's take it more serious.

Fixes 7b1eda223deb ("ALSA: usb-mixer: factor out quirks")
---
 sound/usb/mixer.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
sound/usb/mixer.c +3 -1
index 73d7dff425c1..c095d9751924 100644
@@ -3490,7 +3490,9 @@ int snd_usb_create_mixer(struct snd_usb_audio *chip, int ctrlif,
 	if (err < 0)
 		goto _error;
 
-	snd_usb_mixer_apply_create_quirk(mixer);
+	err = snd_usb_mixer_apply_create_quirk(mixer);
+	if (err < 0)
+		goto _error;
 
 	err = snd_device_new(chip->card, SNDRV_DEV_CODEC, mixer, &dev_ops);
 	if (err < 0)
Signature · 1 line
2.16.4