aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/orinoco/main.c
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/orinoco/main.c
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/orinoco/main.c')
-rw-r--r--drivers/net/wireless/orinoco/main.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/drivers/net/wireless/orinoco/main.c b/drivers/net/wireless/orinoco/main.c
index 1e802f82ae49..38ec8d19ac29 100644
--- a/drivers/net/wireless/orinoco/main.c
+++ b/drivers/net/wireless/orinoco/main.c
@@ -853,12 +853,8 @@ void __orinoco_ev_rx(struct net_device *dev, struct hermes *hw)
853 int err; 853 int err;
854 854
855 desc = kmalloc(sizeof(*desc), GFP_ATOMIC); 855 desc = kmalloc(sizeof(*desc), GFP_ATOMIC);
856 if (!desc) { 856 if (!desc)
857 printk(KERN_WARNING
858 "%s: Can't allocate space for RX descriptor\n",
859 dev->name);
860 goto update_stats; 857 goto update_stats;
861 }
862 858
863 rxfid = hermes_read_regn(hw, RXFID); 859 rxfid = hermes_read_regn(hw, RXFID);
864 860
@@ -1336,10 +1332,9 @@ static void qbuf_scan(struct orinoco_private *priv, void *buf,
1336 unsigned long flags; 1332 unsigned long flags;
1337 1333
1338 sd = kmalloc(sizeof(*sd), GFP_ATOMIC); 1334 sd = kmalloc(sizeof(*sd), GFP_ATOMIC);
1339 if (!sd) { 1335 if (!sd)
1340 printk(KERN_ERR "%s: failed to alloc memory\n", __func__);
1341 return; 1336 return;
1342 } 1337
1343 sd->buf = buf; 1338 sd->buf = buf;
1344 sd->len = len; 1339 sd->len = len;
1345 sd->type = type; 1340 sd->type = type;
@@ -1357,10 +1352,9 @@ static void qabort_scan(struct orinoco_private *priv)
1357 unsigned long flags; 1352 unsigned long flags;
1358 1353
1359 sd = kmalloc(sizeof(*sd), GFP_ATOMIC); 1354 sd = kmalloc(sizeof(*sd), GFP_ATOMIC);
1360 if (!sd) { 1355 if (!sd)
1361 printk(KERN_ERR "%s: failed to alloc memory\n", __func__);
1362 return; 1356 return;
1363 } 1357
1364 sd->len = -1; /* Abort */ 1358 sd->len = -1; /* Abort */
1365 1359
1366 spin_lock_irqsave(&priv->scan_lock, flags); 1360 spin_lock_irqsave(&priv->scan_lock, flags);