mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-26 13:44:15 +08:00
synclink_gt: use pci_zalloc_consistent
Remove the now unnecessary memset too. Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
8b983be54b
commit
d54d7796c5
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user