treewide: kmalloc() -> kmalloc_array()
[sfrench/cifs-2.6.git] / drivers / net / ethernet / moxa / moxart_ether.c
index 2e4effa9fe456d4c0e8029136bf99cffad407dd2..b34055ac476f72191ca498ad11808f47fedac767 100644 (file)
@@ -507,15 +507,15 @@ static int moxart_mac_probe(struct platform_device *pdev)
                goto init_fail;
        }
 
-       priv->tx_buf_base = kmalloc(priv->tx_buf_size * TX_DESC_NUM,
-                                   GFP_ATOMIC);
+       priv->tx_buf_base = kmalloc_array(priv->tx_buf_size, TX_DESC_NUM,
+                                         GFP_ATOMIC);
        if (!priv->tx_buf_base) {
                ret = -ENOMEM;
                goto init_fail;
        }
 
-       priv->rx_buf_base = kmalloc(priv->rx_buf_size * RX_DESC_NUM,
-                                   GFP_ATOMIC);
+       priv->rx_buf_base = kmalloc_array(priv->rx_buf_size, RX_DESC_NUM,
+                                         GFP_ATOMIC);
        if (!priv->rx_buf_base) {
                ret = -ENOMEM;
                goto init_fail;