diff options
Diffstat (limited to 'drivers/usb/misc/idmouse.c')
-rw-r--r-- | drivers/usb/misc/idmouse.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/usb/misc/idmouse.c b/drivers/usb/misc/idmouse.c index d8cde1017985..b3aca5124339 100644 --- a/drivers/usb/misc/idmouse.c +++ b/drivers/usb/misc/idmouse.c | |||
@@ -340,10 +340,9 @@ static int idmouse_probe(struct usb_interface *interface, | |||
340 | return -ENODEV; | 340 | return -ENODEV; |
341 | 341 | ||
342 | /* allocate memory for our device state and initialize it */ | 342 | /* allocate memory for our device state and initialize it */ |
343 | dev = kmalloc(sizeof(*dev), GFP_KERNEL); | 343 | dev = kzalloc(sizeof(*dev), GFP_KERNEL); |
344 | if (dev == NULL) | 344 | if (dev == NULL) |
345 | return -ENOMEM; | 345 | return -ENOMEM; |
346 | memset(dev, 0x00, sizeof(*dev)); | ||
347 | 346 | ||
348 | init_MUTEX(&dev->sem); | 347 | init_MUTEX(&dev->sem); |
349 | dev->udev = udev; | 348 | dev->udev = udev; |