summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/atmel_cs.c
diff options
context:
space:
mode:
authorJoe Perches2013-02-03 18:28:14 +0100
committerDavid S. Miller2013-02-04 19:22:34 +0100
commit0d2e7a5c608063f72048899d20505c2ee130566c (patch)
tree4eae4acaf7c04bb60337389aaef8065c00b1737a /drivers/net/wireless/atmel_cs.c
parentwimax: Remove unnecessary alloc/OOM messages, alloc cleanups (diff)
downloadkernel-qcow2-linux-0d2e7a5c608063f72048899d20505c2ee130566c.tar.gz
kernel-qcow2-linux-0d2e7a5c608063f72048899d20505c2ee130566c.tar.xz
kernel-qcow2-linux-0d2e7a5c608063f72048899d20505c2ee130566c.zip
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/atmel_cs.c')
-rw-r--r--drivers/net/wireless/atmel_cs.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/net/wireless/atmel_cs.c b/drivers/net/wireless/atmel_cs.c
index ded03d226a71..b42930f457c2 100644
--- a/drivers/net/wireless/atmel_cs.c
+++ b/drivers/net/wireless/atmel_cs.c
@@ -79,10 +79,9 @@ static int atmel_probe(struct pcmcia_device *p_dev)
/* Allocate space for private device-specific data */
local = kzalloc(sizeof(local_info_t), GFP_KERNEL);
- if (!local) {
- printk(KERN_ERR "atmel_cs: no memory for new device\n");
+ if (!local)
return -ENOMEM;
- }
+
p_dev->priv = local;
return atmel_config(p_dev);