aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorOliver Neukum <oliver@neukum.org>2006-01-06 22:40:02 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2006-03-20 14:49:53 -0800
commit1144cf7af2ff8e6816e360d03f867439f7efde40 (patch)
treed6e9463fbe66165723b1233b2de093ffef51e27e /drivers
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')
-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 e2d1198623e..f6bdaf08a80 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);