From: Joe Perches Date: Thu, 26 Jun 2014 00:43:20 +0000 (+1000) Subject: synclink_gt: use pci_zalloc_consistent X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=a3b19ce0f6bd108270d2ab3f201e16a49d417eea;p=karo-tx-linux.git synclink_gt: use pci_zalloc_consistent Remove the now unnecessary memset too. Signed-off-by: Joe Perches Acked-by: Greg Kroah-Hartman Cc: Jiri Slaby Signed-off-by: Andrew Morton --- diff --git a/drivers/tty/synclink_gt.c b/drivers/tty/synclink_gt.c index c359a91f7346..07ea71cc933e 100644 --- a/drivers/tty/synclink_gt.c +++ b/drivers/tty/synclink_gt.c @@ -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;