OSDN Git Service

ALSA: usb-audio: Handle the error from snd_usb_mixer_apply_create_quirk()
authorTakashi Iwai <tiwai@suse.de>
Wed, 24 Apr 2019 11:00:03 +0000 (13:00 +0200)
committerTakashi Iwai <tiwai@suse.de>
Wed, 24 Apr 2019 11:00:03 +0000 (13:00 +0200)
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 <tiwai@suse.de>
sound/usb/mixer.c

index 73d7dff..c095d97 100644 (file)
@@ -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)