]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Merge branch 'for-next' of git://gitorious.org/usb/usb into usb-next
authorGreg Kroah-Hartman <gregkh@suse.de>
Fri, 3 Dec 2010 20:10:06 +0000 (12:10 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 3 Dec 2010 20:10:29 +0000 (12:10 -0800)
* 'for-next' of git://gitorious.org/usb/usb:
  usb: musb: gadget: prevent a NULL pointer dereference
  usb: musb: add names for IRQs in structure resource
  usb: musb: remove board_data parameter from musb_platform_init()

drivers/usb/gadget/u_audio.c
drivers/uwb/i1480/i1480-est.c
drivers/uwb/whc-rc.c

index 7a86d2c9109c6bae8341e4d659792a9315d1a19f..59ffe1ecf1c9ad92d01cd020ca7ac73e36f9734b 100644 (file)
@@ -255,6 +255,7 @@ static int gaudio_open_snd_dev(struct gaudio *card)
                ERROR(card, "No such PCM capture device: %s\n", fn_cap);
                snd->substream = NULL;
                snd->card = NULL;
+               snd->filp = NULL;
        } else {
                pcm_file = snd->filp->private_data;
                snd->substream = pcm_file->substream;
@@ -273,17 +274,17 @@ static int gaudio_close_snd_dev(struct gaudio *gau)
 
        /* Close control device */
        snd = &gau->control;
-       if (!IS_ERR(snd->filp))
+       if (snd->filp)
                filp_close(snd->filp, current->files);
 
        /* Close PCM playback device and setup substream */
        snd = &gau->playback;
-       if (!IS_ERR(snd->filp))
+       if (snd->filp)
                filp_close(snd->filp, current->files);
 
        /* Close PCM capture device and setup substream */
        snd = &gau->capture;
-       if (!IS_ERR(snd->filp))
+       if (snd->filp)
                filp_close(snd->filp, current->files);
 
        return 0;
@@ -304,8 +305,7 @@ int __init gaudio_setup(struct gaudio *card)
        ret = gaudio_open_snd_dev(card);
        if (ret)
                ERROR(card, "we need at least one control device\n");
-
-       if (!the_card)
+       else if (!the_card)
                the_card = card;
 
        return ret;
index f2eb4d8b76c9b34abf3b117f6ee2f93997440780..d5de5e131d4794e345523293b9dde55ed4c78e93 100644 (file)
@@ -91,7 +91,7 @@ MODULE_LICENSE("GPL");
  *
  * [so we are loaded when this kind device is connected]
  */
-static struct usb_device_id i1480_est_id_table[] = {
+static struct usb_device_id __used i1480_est_id_table[] = {
        { USB_DEVICE(0x8086, 0xdf3b), },
        { USB_DEVICE(0x8086, 0x0c3b), },
        { },
index 73495583c4444bba046779115b56c905e2c0c424..70a004aa19db64edfb69c3f20018ef008c556c0e 100644 (file)
@@ -449,7 +449,7 @@ static int whcrc_post_reset(struct umc_dev *umc)
 }
 
 /* PCI device ID's that we handle [so it gets loaded] */
-static struct pci_device_id whcrc_id_table[] = {
+static struct pci_device_id __used whcrc_id_table[] = {
        { PCI_DEVICE_CLASS(PCI_CLASS_WIRELESS_WHCI, ~0) },
        { /* empty last entry */ }
 };