Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
[~shefty/rdma-dev.git] / drivers / net / wireless / ipw2x00 / ipw2100.c
index b3ab7b7becae1c1aae93f99b6a18be26ae7c1c7c..cb066f62879d178ed5039f6a1ca2058c972a9149 100644 (file)
@@ -4464,13 +4464,10 @@ static int ipw2100_tx_allocate(struct ipw2100_priv *priv)
                return err;
        }
 
-       priv->tx_buffers =
-           kmalloc(TX_PENDED_QUEUE_LENGTH * sizeof(struct ipw2100_tx_packet),
-                   GFP_ATOMIC);
+       priv->tx_buffers = kmalloc_array(TX_PENDED_QUEUE_LENGTH,
+                                        sizeof(struct ipw2100_tx_packet),
+                                        GFP_ATOMIC);
        if (!priv->tx_buffers) {
-               printk(KERN_ERR DRV_NAME
-                      ": %s: alloc failed form tx buffers.\n",
-                      priv->net_dev->name);
                bd_queue_free(priv, &priv->tx_queue);
                return -ENOMEM;
        }