diff options
author | Eric Sesterhenn <snakebyte@gmx.de> | 2006-02-27 15:29:43 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-03-20 17:49:59 -0500 |
commit | 80b6ca48321974a6566a1c9048ba34f60420bca6 (patch) | |
tree | a350e3cf6b794081c13c89d5b1913b2c1207570d /drivers/usb/misc/usblcd.c | |
parent | d54a5cb6484705f7808b337917cc7598f2f971c3 (diff) |
[PATCH] USB: kzalloc() conversion for rest of drivers/usb
Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/misc/usblcd.c')
-rw-r--r-- | drivers/usb/misc/usblcd.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/usb/misc/usblcd.c b/drivers/usb/misc/usblcd.c index cc3dae3f34e0..c82c402285a0 100644 --- a/drivers/usb/misc/usblcd.c +++ b/drivers/usb/misc/usblcd.c | |||
@@ -270,12 +270,11 @@ static int lcd_probe(struct usb_interface *interface, const struct usb_device_id | |||
270 | int retval = -ENOMEM; | 270 | int retval = -ENOMEM; |
271 | 271 | ||
272 | /* allocate memory for our device state and initialize it */ | 272 | /* allocate memory for our device state and initialize it */ |
273 | dev = kmalloc(sizeof(*dev), GFP_KERNEL); | 273 | dev = kzalloc(sizeof(*dev), GFP_KERNEL); |
274 | if (dev == NULL) { | 274 | if (dev == NULL) { |
275 | err("Out of memory"); | 275 | err("Out of memory"); |
276 | goto error; | 276 | goto error; |
277 | } | 277 | } |
278 | memset(dev, 0x00, sizeof(*dev)); | ||
279 | kref_init(&dev->kref); | 278 | kref_init(&dev->kref); |
280 | 279 | ||
281 | dev->udev = usb_get_dev(interface_to_usbdev(interface)); | 280 | dev->udev = usb_get_dev(interface_to_usbdev(interface)); |