summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/usb/misc/idmouse.c3
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,
return -ENODEV;
/* allocate memory for our device state and initialize it */
- dev = kmalloc(sizeof(*dev), GFP_KERNEL);
+ dev = kzalloc(sizeof(*dev), GFP_KERNEL);
if (dev == NULL)
return -ENOMEM;
- memset(dev, 0x00, sizeof(*dev));
init_MUTEX(&dev->sem);
dev->udev = udev;