Skip to content

Commit

Permalink
[PATCH] USB: kzalloc in ldusb
Browse files Browse the repository at this point in the history
another one for kzalloc

Signed-off-by: Oliver Neukum <oliver@neukum.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Oliver Neukum authored and Greg Kroah-Hartman committed Mar 20, 2006
1 parent 092e462 commit 1144cf7
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/usb/misc/ldusb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 1144cf7

Please sign in to comment.