]> err.no Git - linux-2.6/commitdiff
[PATCH] USB: kzalloc in cytherm
authorOliver Neukum <oliver@neukum.org>
Fri, 6 Jan 2006 21:24:56 +0000 (22:24 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 20 Mar 2006 22:49:53 +0000 (14:49 -0800)
another one for kzalloc.

Signed-off-by: Oliver Neukum <oliver@neukum.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/misc/cytherm.c

index 6671317b495f4c996319463fd29796ae92a5b99e..a04204292aa3db244f73ee38ad3e96e414d9d75b 100644 (file)
@@ -351,12 +351,11 @@ static int cytherm_probe(struct usb_interface *interface,
        struct usb_cytherm *dev = NULL;
        int retval = -ENOMEM;
 
-       dev = kmalloc (sizeof(struct usb_cytherm), GFP_KERNEL);
+       dev = kzalloc (sizeof(struct usb_cytherm), GFP_KERNEL);
        if (dev == NULL) {
                dev_err (&interface->dev, "Out of memory\n");
                goto error;
        }
-       memset (dev, 0x00, sizeof (*dev));
 
        dev->udev = usb_get_dev(udev);