From: Oliver Neukum Date: Fri, 6 Jan 2006 21:36:27 +0000 (+0100) Subject: [PATCH] USB: kzalloc in idmouse X-Git-Tag: v2.6.17-rc1~1176^2~70 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=092e462a537ba60e5f78ff208c8a95e6fd071fa5;p=linux-2.6 [PATCH] USB: kzalloc in idmouse another for kzalloc. Signed-off-by: Oliver Neukum Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/misc/idmouse.c b/drivers/usb/misc/idmouse.c index d8cde10179..b3aca51243 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;