diff options
-rw-r--r-- | drivers/tty/synclink_gt.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/tty/synclink_gt.c b/drivers/tty/synclink_gt.c index ba1dbcdf4609..0e8c39b6ccd4 100644 --- a/drivers/tty/synclink_gt.c +++ b/drivers/tty/synclink_gt.c | |||
@@ -3383,12 +3383,11 @@ static int alloc_desc(struct slgt_info *info) | |||
3383 | unsigned int pbufs; | 3383 | unsigned int pbufs; |
3384 | 3384 | ||
3385 | /* allocate memory to hold descriptor lists */ | 3385 | /* allocate memory to hold descriptor lists */ |
3386 | info->bufs = pci_alloc_consistent(info->pdev, DESC_LIST_SIZE, &info->bufs_dma_addr); | 3386 | info->bufs = pci_zalloc_consistent(info->pdev, DESC_LIST_SIZE, |
3387 | &info->bufs_dma_addr); | ||
3387 | if (info->bufs == NULL) | 3388 | if (info->bufs == NULL) |
3388 | return -ENOMEM; | 3389 | return -ENOMEM; |
3389 | 3390 | ||
3390 | memset(info->bufs, 0, DESC_LIST_SIZE); | ||
3391 | |||
3392 | info->rbufs = (struct slgt_desc*)info->bufs; | 3391 | info->rbufs = (struct slgt_desc*)info->bufs; |
3393 | info->tbufs = ((struct slgt_desc*)info->bufs) + info->rbuf_count; | 3392 | info->tbufs = ((struct slgt_desc*)info->bufs) + info->rbuf_count; |
3394 | 3393 | ||