ALSA: snd-usb-caiaq: initialize card pointer
[pandora-kernel.git] / sound / usb / caiaq / device.c
index 45bc4a2..88e3f81 100644 (file)
@@ -50,7 +50,8 @@ MODULE_SUPPORTED_DEVICE("{{Native Instruments, RigKontrol2},"
                         "{Native Instruments, Session I/O},"
                         "{Native Instruments, GuitarRig mobile}"
                         "{Native Instruments, Traktor Kontrol X1}"
-                        "{Native Instruments, Traktor Kontrol S4}");
+                        "{Native Instruments, Traktor Kontrol S4}"
+                        "{Native Instruments, Maschine Controller}");
 
 static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-max */
 static char* id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; /* Id for this card */
@@ -146,6 +147,11 @@ static struct usb_device_id snd_usb_id_table[] = {
                .idVendor =     USB_VID_NATIVEINSTRUMENTS,
                .idProduct =    USB_PID_TRAKTORAUDIO2
        },
+       {
+               .match_flags =  USB_DEVICE_ID_MATCH_DEVICE,
+               .idVendor =     USB_VID_NATIVEINSTRUMENTS,
+               .idProduct =    USB_PID_MASCHINECONTROLLER
+       },
        { /* terminator */ }
 };
 
@@ -479,7 +485,7 @@ static int __devinit snd_probe(struct usb_interface *intf,
                     const struct usb_device_id *id)
 {
        int ret;
-       struct snd_card *card;
+       struct snd_card *card = NULL;
        struct usb_device *device = interface_to_usbdev(intf);
 
        ret = create_card(device, intf, &card);