提交 61eded6e 编写于 作者: O Oliver Neukum 提交者: Greg Kroah-Hartman

[PATCH] USB: microtek patch to use kzalloc

here is another one to use kzalloc. Please apply.
Signed-off-by: NOliver Neukum <oliver@neukum.name>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 dcab4eaf
...@@ -773,11 +773,10 @@ static int mts_usb_probe(struct usb_interface *intf, ...@@ -773,11 +773,10 @@ static int mts_usb_probe(struct usb_interface *intf,
} }
new_desc = kmalloc(sizeof(struct mts_desc), GFP_KERNEL); new_desc = kzalloc(sizeof(struct mts_desc), GFP_KERNEL);
if (!new_desc) if (!new_desc)
goto out; goto out;
memset(new_desc, 0, sizeof(*new_desc));
new_desc->urb = usb_alloc_urb(0, GFP_KERNEL); new_desc->urb = usb_alloc_urb(0, GFP_KERNEL);
if (!new_desc->urb) if (!new_desc->urb)
goto out_kfree; goto out_kfree;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册