]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - sound/usb/quirks.c
ALSA: usb - fix race in creation of M-Audio Fast track pro driver
[karo-tx-linux.git] / sound / usb / quirks.c
index acc12f004c23f05f12b21aa311f2f49dc77652d5..e71fc8bc3a70da7d98caecba69ba7153275bdbe7 100644 (file)
@@ -387,11 +387,13 @@ static int snd_usb_fasttrackpro_boot_quirk(struct usb_device *dev)
                 * rules
                 */
                err = usb_driver_set_configuration(dev, 2);
-               if (err < 0) {
+               if (err < 0)
                        snd_printdd("error usb_driver_set_configuration: %d\n",
                                    err);
-                       return -ENODEV;
-               }
+               /* Always return an error, so that we stop creating a device
+                  that will just be destroyed and recreated with a new
+                  configuration */
+               return -ENODEV;
        } else
                snd_printk(KERN_INFO "usb-audio: Fast Track Pro config OK\n");