aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ipw2x00
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2013-02-03 12:28:14 -0500
committerDavid S. Miller <davem@davemloft.net>2013-02-04 13:22:34 -0500
commit0d2e7a5c608063f72048899d20505c2ee130566c (patch)
tree4eae4acaf7c04bb60337389aaef8065c00b1737a /drivers/net/wireless/ipw2x00
parent9d11bd1592fba0b9231d3ce8ab61977db7e03e27 (diff)
wireless: Remove unnecessary alloc/OOM messages, alloc cleanups
alloc failures already get standardized OOM messages and a dump_stack. Convert kzalloc's with multiplies to kcalloc. Convert kmalloc's with multiplies to kmalloc_array. Remove now unused variables. Remove unnecessary memset after kzalloc->kcalloc. Whitespace cleanups for these changes. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/wireless/ipw2x00')
-rw-r--r--drivers/net/wireless/ipw2x00/ipw2100.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/net/wireless/ipw2x00/ipw2100.c b/drivers/net/wireless/ipw2x00/ipw2100.c
index d92b21a8e597..04d5e6442bf6 100644
--- a/drivers/net/wireless/ipw2x00/ipw2100.c
+++ b/drivers/net/wireless/ipw2x00/ipw2100.c
@@ -4478,13 +4478,10 @@ static int ipw2100_tx_allocate(struct ipw2100_priv *priv)
4478 return err; 4478 return err;
4479 } 4479 }
4480 4480
4481 priv->tx_buffers = 4481 priv->tx_buffers = kmalloc_array(TX_PENDED_QUEUE_LENGTH,
4482 kmalloc(TX_PENDED_QUEUE_LENGTH * sizeof(struct ipw2100_tx_packet), 4482 sizeof(struct ipw2100_tx_packet),
4483 GFP_ATOMIC); 4483 GFP_ATOMIC);
4484 if (!priv->tx_buffers) { 4484 if (!priv->tx_buffers) {
4485 printk(KERN_ERR DRV_NAME
4486 ": %s: alloc failed form tx buffers.\n",
4487 priv->net_dev->name);
4488 bd_queue_free(priv, &priv->tx_queue); 4485 bd_queue_free(priv, &priv->tx_queue);
4489 return -ENOMEM; 4486 return -ENOMEM;
4490 } 4487 }