Commit 5f748133 authored by Oliver Neukum's avatar Oliver Neukum Committed by Greg Kroah-Hartman

[PATCH] USB: kzalloc in cytherm

another one for kzalloc.
Signed-off-by: default avatarOliver Neukum <oliver@neukum.name>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 51b208dd
...@@ -351,12 +351,11 @@ static int cytherm_probe(struct usb_interface *interface, ...@@ -351,12 +351,11 @@ static int cytherm_probe(struct usb_interface *interface,
struct usb_cytherm *dev = NULL; struct usb_cytherm *dev = NULL;
int retval = -ENOMEM; int retval = -ENOMEM;
dev = kmalloc (sizeof(struct usb_cytherm), GFP_KERNEL); dev = kzalloc (sizeof(struct usb_cytherm), GFP_KERNEL);
if (dev == NULL) { if (dev == NULL) {
dev_err (&interface->dev, "Out of memory\n"); dev_err (&interface->dev, "Out of memory\n");
goto error; goto error;
} }
memset (dev, 0x00, sizeof (*dev));
dev->udev = usb_get_dev(udev); dev->udev = usb_get_dev(udev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment