提交 d54d7796 编写于 作者: J Joe Perches 提交者: Linus Torvalds

synclink_gt: use pci_zalloc_consistent

Remove the now unnecessary memset too.
Signed-off-by: NJoe Perches <joe@perches.com>
Acked-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 8b983be5
......@@ -3383,12 +3383,11 @@ static int alloc_desc(struct slgt_info *info)
unsigned int pbufs;
/* allocate memory to hold descriptor lists */
info->bufs = pci_alloc_consistent(info->pdev, DESC_LIST_SIZE, &info->bufs_dma_addr);
info->bufs = pci_zalloc_consistent(info->pdev, DESC_LIST_SIZE,
&info->bufs_dma_addr);
if (info->bufs == NULL)
return -ENOMEM;
memset(info->bufs, 0, DESC_LIST_SIZE);
info->rbufs = (struct slgt_desc*)info->bufs;
info->tbufs = ((struct slgt_desc*)info->bufs) + info->rbuf_count;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册