drivers/net: Convert unbounded kzalloc calls to kcalloc
[linux-2.6-block.git] / drivers / net / niu.c
index bc695d53cdccbcca3eb1c2ccb30018acb3c8bde6..b4cc61f1fc59b3456c53bdef8ca426584c2ffe53 100644 (file)
@@ -4504,7 +4504,7 @@ static int niu_alloc_channels(struct niu *np)
 
        np->dev->real_num_tx_queues = np->num_tx_rings;
 
-       np->rx_rings = kzalloc(np->num_rx_rings * sizeof(struct rx_ring_info),
+       np->rx_rings = kcalloc(np->num_rx_rings, sizeof(struct rx_ring_info),
                               GFP_KERNEL);
        err = -ENOMEM;
        if (!np->rx_rings)
@@ -4538,7 +4538,7 @@ static int niu_alloc_channels(struct niu *np)
                        return err;
        }
 
-       np->tx_rings = kzalloc(np->num_tx_rings * sizeof(struct tx_ring_info),
+       np->tx_rings = kcalloc(np->num_tx_rings, sizeof(struct tx_ring_info),
                               GFP_KERNEL);
        err = -ENOMEM;
        if (!np->tx_rings)