]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/usb/misc/idmouse.c
[PATCH] USB: kzalloc in idmouse
[karo-tx-linux.git] / drivers / usb / misc / idmouse.c
index 1dc3e0f73014eeb5efad58cb58193972738ed98e..b3aca51243397e7c6b757f33d27166fc005b0af4 100644 (file)
@@ -114,7 +114,6 @@ static struct usb_class_driver idmouse_class = {
 
 /* usb specific object needed to register this driver with the usb subsystem */
 static struct usb_driver idmouse_driver = {
-       .owner = THIS_MODULE,
        .name = DRIVER_SHORT,
        .probe = idmouse_probe,
        .disconnect = idmouse_disconnect,
@@ -341,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;