summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ti
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2013-02-03 21:28:14 +0400
committerDavid S. Miller <davem@davemloft.net>2013-02-04 22:22:34 +0400
commit0d2e7a5c608063f72048899d20505c2ee130566c (patch)
tree4eae4acaf7c04bb60337389aaef8065c00b1737a /drivers/net/wireless/ti
parent9d11bd1592fba0b9231d3ce8ab61977db7e03e27 (diff)
downloadlinux-0d2e7a5c608063f72048899d20505c2ee130566c.tar.xz
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/ti')
-rw-r--r--drivers/net/wireless/ti/wlcore/sdio.c4
-rw-r--r--drivers/net/wireless/ti/wlcore/spi.c14
2 files changed, 4 insertions, 14 deletions
diff --git a/drivers/net/wireless/ti/wlcore/sdio.c b/drivers/net/wireless/ti/wlcore/sdio.c
index 646f703ae739..a3a20be2036f 100644
--- a/drivers/net/wireless/ti/wlcore/sdio.c
+++ b/drivers/net/wireless/ti/wlcore/sdio.c
@@ -229,10 +229,8 @@ static int wl1271_probe(struct sdio_func *func,
return -ENODEV;
glue = kzalloc(sizeof(*glue), GFP_KERNEL);
- if (!glue) {
- dev_err(&func->dev, "can't allocate glue\n");
+ if (!glue)
goto out;
- }
glue->dev = &func->dev;
diff --git a/drivers/net/wireless/ti/wlcore/spi.c b/drivers/net/wireless/ti/wlcore/spi.c
index f06f4770ce02..18cadc07b754 100644
--- a/drivers/net/wireless/ti/wlcore/spi.c
+++ b/drivers/net/wireless/ti/wlcore/spi.c
@@ -87,11 +87,8 @@ static void wl12xx_spi_reset(struct device *child)
struct spi_message m;
cmd = kzalloc(WSPI_INIT_CMD_LEN, GFP_KERNEL);
- if (!cmd) {
- dev_err(child->parent,
- "could not allocate cmd for spi reset\n");
+ if (!cmd)
return;
- }
memset(&t, 0, sizeof(t));
spi_message_init(&m);
@@ -115,11 +112,8 @@ static void wl12xx_spi_init(struct device *child)
struct spi_message m;
cmd = kzalloc(WSPI_INIT_CMD_LEN, GFP_KERNEL);
- if (!cmd) {
- dev_err(child->parent,
- "could not allocate cmd for spi init\n");
+ if (!cmd)
return;
- }
memset(crc, 0, sizeof(crc));
memset(&t, 0, sizeof(t));
@@ -340,10 +334,8 @@ static int wl1271_probe(struct spi_device *spi)
pdata->ops = &spi_ops;
glue = kzalloc(sizeof(*glue), GFP_KERNEL);
- if (!glue) {
- dev_err(&spi->dev, "can't allocate glue\n");
+ if (!glue)
goto out;
- }
glue->dev = &spi->dev;