提交 5f748133 编写于 作者: O Oliver Neukum 提交者: Greg Kroah-Hartman

[PATCH] USB: kzalloc in cytherm

another one for kzalloc.
Signed-off-by: NOliver Neukum <oliver@neukum.name>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 51b208dd
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册