Commit d54d7796 authored by Joe Perches's avatar Joe Perches Committed by Linus Torvalds
Browse files

synclink_gt: use pci_zalloc_consistent

Remove the now unnecessary memset too.
Signed-off-by: default avatarJoe Perches <>
Acked-by: default avatarGreg Kroah-Hartman <>
Cc: Jiri Slaby <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent 8b983be5
...@@ -3383,12 +3383,11 @@ static int alloc_desc(struct slgt_info *info) ...@@ -3383,12 +3383,11 @@ static int alloc_desc(struct slgt_info *info)
unsigned int pbufs; unsigned int pbufs;
/* allocate memory to hold descriptor lists */ /* 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,
if (info->bufs == NULL) if (info->bufs == NULL)
return -ENOMEM; return -ENOMEM;
memset(info->bufs, 0, DESC_LIST_SIZE);
info->rbufs = (struct slgt_desc*)info->bufs; info->rbufs = (struct slgt_desc*)info->bufs;
info->tbufs = ((struct slgt_desc*)info->bufs) + info->rbuf_count; info->tbufs = ((struct slgt_desc*)info->bufs) + info->rbuf_count;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment