Skip to content

Commit

Permalink
synclink_gt: use pci_zalloc_consistent
Browse files Browse the repository at this point in the history
Remove the now unnecessary memset too.

Signed-off-by: Joe Perches <[email protected]>
Acked-by: Greg Kroah-Hartman <[email protected]>
Cc: Jiri Slaby <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
JoePerches authored and torvalds committed Aug 8, 2014
1 parent 8b983be commit d54d779
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions drivers/tty/synclink_gt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit d54d779

Please sign in to comment.