diff options
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/gadget/net2280.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/usb/gadget/net2280.c b/drivers/usb/gadget/net2280.c index b2d507f16b85..0b9293493957 100644 --- a/drivers/usb/gadget/net2280.c +++ b/drivers/usb/gadget/net2280.c | |||
@@ -2833,13 +2833,13 @@ static int net2280_probe (struct pci_dev *pdev, const struct pci_device_id *id) | |||
2833 | } | 2833 | } |
2834 | 2834 | ||
2835 | /* alloc, and start init */ | 2835 | /* alloc, and start init */ |
2836 | dev = kmalloc (sizeof *dev, SLAB_KERNEL); | 2836 | dev = kzalloc (sizeof *dev, SLAB_KERNEL); |
2837 | if (dev == NULL){ | 2837 | if (dev == NULL){ |
2838 | retval = -ENOMEM; | 2838 | retval = -ENOMEM; |
2839 | goto done; | 2839 | goto done; |
2840 | } | 2840 | } |
2841 | 2841 | ||
2842 | memset (dev, 0, sizeof *dev); | 2842 | pci_set_drvdata (pdev, dev); |
2843 | spin_lock_init (&dev->lock); | 2843 | spin_lock_init (&dev->lock); |
2844 | dev->pdev = pdev; | 2844 | dev->pdev = pdev; |
2845 | dev->gadget.ops = &net2280_ops; | 2845 | dev->gadget.ops = &net2280_ops; |
@@ -2952,7 +2952,6 @@ static int net2280_probe (struct pci_dev *pdev, const struct pci_device_id *id) | |||
2952 | dev->chiprev = get_idx_reg (dev->regs, REG_CHIPREV) & 0xffff; | 2952 | dev->chiprev = get_idx_reg (dev->regs, REG_CHIPREV) & 0xffff; |
2953 | 2953 | ||
2954 | /* done */ | 2954 | /* done */ |
2955 | pci_set_drvdata (pdev, dev); | ||
2956 | INFO (dev, "%s\n", driver_desc); | 2955 | INFO (dev, "%s\n", driver_desc); |
2957 | INFO (dev, "irq %s, pci mem %p, chip rev %04x\n", | 2956 | INFO (dev, "irq %s, pci mem %p, chip rev %04x\n", |
2958 | bufp, base, dev->chiprev); | 2957 | bufp, base, dev->chiprev); |