aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/tokenring
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/tokenring')
-rw-r--r--drivers/net/tokenring/3c359.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/tokenring/3c359.c b/drivers/net/tokenring/3c359.c
index 6612db8ec215..f4251d35599d 100644
--- a/drivers/net/tokenring/3c359.c
+++ b/drivers/net/tokenring/3c359.c
@@ -641,14 +641,14 @@ static int xl_open(struct net_device *dev)
641 * Now to set up the Rx and Tx buffer structures 641 * Now to set up the Rx and Tx buffer structures
642 */ 642 */
643 /* These MUST be on 8 byte boundaries */ 643 /* These MUST be on 8 byte boundaries */
644 xl_priv->xl_tx_ring = kmalloc((sizeof(struct xl_tx_desc) * XL_TX_RING_SIZE) + 7, GFP_DMA | GFP_KERNEL) ; 644 xl_priv->xl_tx_ring = kzalloc((sizeof(struct xl_tx_desc) * XL_TX_RING_SIZE) + 7, GFP_DMA | GFP_KERNEL);
645 if (xl_priv->xl_tx_ring == NULL) { 645 if (xl_priv->xl_tx_ring == NULL) {
646 printk(KERN_WARNING "%s: Not enough memory to allocate rx buffers.\n", 646 printk(KERN_WARNING "%s: Not enough memory to allocate rx buffers.\n",
647 dev->name); 647 dev->name);
648 free_irq(dev->irq,dev); 648 free_irq(dev->irq,dev);
649 return -ENOMEM; 649 return -ENOMEM;
650 } 650 }
651 xl_priv->xl_rx_ring = kmalloc((sizeof(struct xl_rx_desc) * XL_RX_RING_SIZE) +7, GFP_DMA | GFP_KERNEL) ; 651 xl_priv->xl_rx_ring = kzalloc((sizeof(struct xl_rx_desc) * XL_RX_RING_SIZE) +7, GFP_DMA | GFP_KERNEL);
652 if (xl_priv->xl_tx_ring == NULL) { 652 if (xl_priv->xl_tx_ring == NULL) {
653 printk(KERN_WARNING "%s: Not enough memory to allocate rx buffers.\n", 653 printk(KERN_WARNING "%s: Not enough memory to allocate rx buffers.\n",
654 dev->name); 654 dev->name);
@@ -656,8 +656,6 @@ static int xl_open(struct net_device *dev)
656 kfree(xl_priv->xl_tx_ring); 656 kfree(xl_priv->xl_tx_ring);
657 return -ENOMEM; 657 return -ENOMEM;
658 } 658 }
659 memset(xl_priv->xl_tx_ring,0,sizeof(struct xl_tx_desc) * XL_TX_RING_SIZE) ;
660 memset(xl_priv->xl_rx_ring,0,sizeof(struct xl_rx_desc) * XL_RX_RING_SIZE) ;
661 659
662 /* Setup Rx Ring */ 660 /* Setup Rx Ring */
663 for (i=0 ; i < XL_RX_RING_SIZE ; i++) { 661 for (i=0 ; i < XL_RX_RING_SIZE ; i++) {