treewide: kmalloc() -> kmalloc_array()
[sfrench/cifs-2.6.git] / drivers / net / ethernet / freescale / ucc_geth.c
index a96b838cffcebc62e21043f65dbfb9265cf16d79..42fca3208c0bac2e7a72f3f82d3350b85b6d9398 100644 (file)
@@ -2253,9 +2253,9 @@ static int ucc_geth_alloc_tx(struct ucc_geth_private *ugeth)
        /* Init Tx bds */
        for (j = 0; j < ug_info->numQueuesTx; j++) {
                /* Setup the skbuff rings */
-               ugeth->tx_skbuff[j] = kmalloc(sizeof(struct sk_buff *) *
-                                             ugeth->ug_info->bdRingLenTx[j],
-                                             GFP_KERNEL);
+               ugeth->tx_skbuff[j] =
+                       kmalloc_array(ugeth->ug_info->bdRingLenTx[j],
+                                     sizeof(struct sk_buff *), GFP_KERNEL);
 
                if (ugeth->tx_skbuff[j] == NULL) {
                        if (netif_msg_ifup(ugeth))
@@ -2326,9 +2326,9 @@ static int ucc_geth_alloc_rx(struct ucc_geth_private *ugeth)
        /* Init Rx bds */
        for (j = 0; j < ug_info->numQueuesRx; j++) {
                /* Setup the skbuff rings */
-               ugeth->rx_skbuff[j] = kmalloc(sizeof(struct sk_buff *) *
-                                             ugeth->ug_info->bdRingLenRx[j],
-                                             GFP_KERNEL);
+               ugeth->rx_skbuff[j] =
+                       kmalloc_array(ugeth->ug_info->bdRingLenRx[j],
+                                     sizeof(struct sk_buff *), GFP_KERNEL);
 
                if (ugeth->rx_skbuff[j] == NULL) {
                        if (netif_msg_ifup(ugeth))