treewide: kmalloc() -> kmalloc_array()
[linux-block.git] / drivers / net / wireless / intel / ipw2x00 / ipw2100.c
index 7c4f550a1475d24dd87a6c075b8ff423a250243b..b8fd3cc90634d116af789caeae309444fffae42b 100644 (file)
@@ -3445,8 +3445,9 @@ static int ipw2100_msg_allocate(struct ipw2100_priv *priv)
        dma_addr_t p;
 
        priv->msg_buffers =
-           kmalloc(IPW_COMMAND_POOL_SIZE * sizeof(struct ipw2100_tx_packet),
-                   GFP_KERNEL);
+           kmalloc_array(IPW_COMMAND_POOL_SIZE,
+                         sizeof(struct ipw2100_tx_packet),
+                         GFP_KERNEL);
        if (!priv->msg_buffers)
                return -ENOMEM;
 
@@ -4587,9 +4588,9 @@ static int ipw2100_rx_allocate(struct ipw2100_priv *priv)
        /*
         * allocate packets
         */
-       priv->rx_buffers = kmalloc(RX_QUEUE_LENGTH *
-                                  sizeof(struct ipw2100_rx_packet),
-                                  GFP_KERNEL);
+       priv->rx_buffers = kmalloc_array(RX_QUEUE_LENGTH,
+                                        sizeof(struct ipw2100_rx_packet),
+                                        GFP_KERNEL);
        if (!priv->rx_buffers) {
                IPW_DEBUG_INFO("can't allocate rx packet buffer table\n");