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

[PATCH] USB: kzalloc in dabusb

kzalloc in dabusb.
Signed-off-by: NOliver Neukum <oliver@neukum.name>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 bbdb7daf
......@@ -217,12 +217,11 @@ static int dabusb_alloc_buffers (pdabusb_t s)
pipesize, packets, transfer_buffer_length);
while (buffers < (s->total_buffer_size << 10)) {
b = (pbuff_t) kmalloc (sizeof (buff_t), GFP_KERNEL);
b = (pbuff_t) kzalloc (sizeof (buff_t), GFP_KERNEL);
if (!b) {
err("kmalloc(sizeof(buff_t))==NULL");
err("kzalloc(sizeof(buff_t))==NULL");
goto err;
}
memset (b, 0, sizeof (buff_t));
b->s = s;
b->purb = usb_alloc_urb(packets, GFP_KERNEL);
if (!b->purb) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册