synclink_gt: use pci_zalloc_consistent
authorJoe Perches <joe@perches.com>
Fri, 8 Aug 2014 21:24:51 +0000 (14:24 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 8 Aug 2014 22:57:30 +0000 (15:57 -0700)
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>
drivers/tty/synclink_gt.c

index ba1dbcdf46096439637ad0a6fa8e2603b19e4b0d..0e8c39b6ccd45643051b2ee2876a0eda59595034 100644 (file)
@@ -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;