]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
synclink_gt: use pci_zalloc_consistent
authorJoe Perches <joe@perches.com>
Thu, 26 Jun 2014 00:43:20 +0000 (10:43 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 27 Jun 2014 04:21:51 +0000 (14:21 +1000)
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>
drivers/tty/synclink_gt.c

index c359a91f7346071396e7ba0ec9d3f4bb4a381772..07ea71cc933ea1595bf59775554369b701dd642b 100644 (file)
@@ -3387,12 +3387,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;