From 1144cf7af2ff8e6816e360d03f867439f7efde40 Mon Sep 17 00:00:00 2001 From: Oliver Neukum Date: Fri, 6 Jan 2006 22:40:02 +0100 Subject: [PATCH] USB: kzalloc in ldusb another one for kzalloc Signed-off-by: Oliver Neukum Signed-off-by: Greg Kroah-Hartman --- drivers/usb/misc/ldusb.c | 3 +-- 1 file changed, 1 insertion(+), 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 * /* allocate memory for our device state and intialize it */ - dev = kmalloc(sizeof(*dev), GFP_KERNEL); + dev = kzalloc(sizeof(*dev), GFP_KERNEL); if (dev == NULL) { dev_err(&intf->dev, "Out of memory\n"); goto exit; } - memset(dev, 0x00, sizeof(*dev)); init_MUTEX(&dev->sem); dev->intf = intf; init_waitqueue_head(&dev->read_wait); -- cgit v1.2.3