aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/misc/ldusb.c
diff options
context:
space:
mode:
authorOliver Neukum <oliver@neukum.org>2006-01-06 16:40:02 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2006-03-20 17:49:53 -0500
commit1144cf7af2ff8e6816e360d03f867439f7efde40 (patch)
treed6e9463fbe66165723b1233b2de093ffef51e27e /drivers/usb/misc/ldusb.c
parent092e462a537ba60e5f78ff208c8a95e6fd071fa5 (diff)
[PATCH] USB: kzalloc in ldusb
another one for kzalloc Signed-off-by: Oliver Neukum <oliver@neukum.name> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/misc/ldusb.c')
-rw-r--r--drivers/usb/misc/ldusb.c3
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);