Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c821d55c67213e96e6e0feb7418746a25fea6e4d
Commit:     c821d55c67213e96e6e0feb7418746a25fea6e4d
Parent:     b1c9e0f7806d1f627f534fd0f83f235087496f7a
Author:     Surya Prabhakar N <[EMAIL PROTECTED]>
AuthorDate: Mon Aug 13 15:43:30 2007 +0530
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Wed Oct 10 16:50:28 2007 -0700

    drivers/net/tokenring/3c359.c
    
    Hi,
       Replacing kmalloc with kzalloc and cleaning up memset in
    drivers/net/tokenring/3c359.c
    
    Signed-off-by: Surya Prabhakar <[EMAIL PROTECTED]>
    Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]>
---
 drivers/net/tokenring/3c359.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/net/tokenring/3c359.c b/drivers/net/tokenring/3c359.c
index 6612db8..f4251d3 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)
         * Now to set up the Rx and Tx buffer structures
         */
        /* These MUST be on 8 byte boundaries */
-       xl_priv->xl_tx_ring = kmalloc((sizeof(struct xl_tx_desc) * 
XL_TX_RING_SIZE) + 7, GFP_DMA | GFP_KERNEL) ; 
+       xl_priv->xl_tx_ring = kzalloc((sizeof(struct xl_tx_desc) * 
XL_TX_RING_SIZE) + 7, GFP_DMA | GFP_KERNEL);
        if (xl_priv->xl_tx_ring == NULL) {
                printk(KERN_WARNING "%s: Not enough memory to allocate rx 
buffers.\n",
                                     dev->name);
                free_irq(dev->irq,dev);
                return -ENOMEM;
        }
-       xl_priv->xl_rx_ring = kmalloc((sizeof(struct xl_rx_desc) * 
XL_RX_RING_SIZE) +7, GFP_DMA | GFP_KERNEL) ; 
+       xl_priv->xl_rx_ring = kzalloc((sizeof(struct xl_rx_desc) * 
XL_RX_RING_SIZE) +7, GFP_DMA | GFP_KERNEL);
        if (xl_priv->xl_tx_ring == NULL) {
                printk(KERN_WARNING "%s: Not enough memory to allocate rx 
buffers.\n",
                                     dev->name);
@@ -656,8 +656,6 @@ static int xl_open(struct net_device *dev)
                kfree(xl_priv->xl_tx_ring);
                return -ENOMEM;
        }
-       memset(xl_priv->xl_tx_ring,0,sizeof(struct xl_tx_desc) * 
XL_TX_RING_SIZE) ; 
-       memset(xl_priv->xl_rx_ring,0,sizeof(struct xl_rx_desc) * 
XL_RX_RING_SIZE) ; 
 
         /* Setup Rx Ring */
         for (i=0 ; i < XL_RX_RING_SIZE ; i++) { 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to