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>
This commit is contained in:

committed by
David S. Miller

parent
9d11bd1592
commit
0d2e7a5c60
@@ -4478,13 +4478,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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user