diff options
author | Oliver Neukum <oliver@neukum.org> | 2006-01-06 16:36:27 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-03-20 17:49:53 -0500 |
commit | 092e462a537ba60e5f78ff208c8a95e6fd071fa5 (patch) | |
tree | 87546f74115d694060781aa829509bbee963bdf9 /drivers/usb/misc/idmouse.c | |
parent | 5f7481337cc803926b5c43aac44441f683ff91ed (diff) |
[PATCH] USB: kzalloc in idmouse
another for kzalloc.
Signed-off-by: Oliver Neukum <oliver@neukum.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
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; |