diff options
Diffstat (limited to 'drivers/net/wireless/ti')
-rw-r--r-- | drivers/net/wireless/ti/wlcore/sdio.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/ti/wlcore/spi.c | 14 |
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; |