diff options
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)); |