diff options
-rw-r--r-- | drivers/usb/misc/ldusb.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/usb/misc/ldusb.c b/drivers/usb/misc/ldusb.c index e2d1198623eb..f6bdaf08a80f 100644 --- a/drivers/usb/misc/ldusb.c +++ b/drivers/usb/misc/ldusb.c | |||
@@ -626,12 +626,11 @@ static int ld_usb_probe(struct usb_interface *intf, const struct usb_device_id * | |||
626 | 626 | ||
627 | /* allocate memory for our device state and intialize it */ | 627 | /* allocate memory for our device state and intialize it */ |
628 | 628 | ||
629 | dev = kmalloc(sizeof(*dev), GFP_KERNEL); | 629 | dev = kzalloc(sizeof(*dev), GFP_KERNEL); |
630 | if (dev == NULL) { | 630 | if (dev == NULL) { |
631 | dev_err(&intf->dev, "Out of memory\n"); | 631 | dev_err(&intf->dev, "Out of memory\n"); |
632 | goto exit; | 632 | goto exit; |
633 | } | 633 | } |
634 | memset(dev, 0x00, sizeof(*dev)); | ||
635 | init_MUTEX(&dev->sem); | 634 | init_MUTEX(&dev->sem); |
636 | dev->intf = intf; | 635 | dev->intf = intf; |
637 | init_waitqueue_head(&dev->read_wait); | 636 | init_waitqueue_head(&dev->read_wait); |