From: Takashi Iwai Date: Wed, 24 Apr 2019 11:00:03 +0000 (+0200) Subject: ALSA: usb-audio: Handle the error from snd_usb_mixer_apply_create_quirk() X-Git-Tag: v3.16.74~88 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9b6f9e20a1221b5c970bf8e7b1646a07bd02f9ae;p=thirdparty%2Fkernel%2Fstable.git ALSA: usb-audio: Handle the error from snd_usb_mixer_apply_create_quirk() commit 328e9f6973be2ee67862cb17bf6c0c5c5918cd72 upstream. 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") Signed-off-by: Takashi Iwai Signed-off-by: Ben Hutchings --- diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c index 538df481fe5e9..e08a859ee9978 100644 --- a/sound/usb/mixer.c +++ b/sound/usb/mixer.c @@ -2499,7 +2499,9 @@ int snd_usb_create_mixer(struct snd_usb_audio *chip, int ctrlif, (err = snd_usb_mixer_status_create(mixer)) < 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)