summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorChaehyun Lim <chaehyun.lim@gmail.com>2016-02-01 13:26:47 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-02-04 00:34:29 +0100
commite5349952de5b1138e6275529e4ec08c0ed33777f (patch)
tree7387379386b166747c03953f43b5627fd89e0d2f /drivers
parentstaging: wilc1000: linux_mon: fix error code of kmalloc (diff)
downloadlinux-e5349952de5b1138e6275529e4ec08c0ed33777f.tar.xz
linux-e5349952de5b1138e6275529e4ec08c0ed33777f.zip
staging: wilc1000: linux_mon: remove debug message of kmalloc failure
There is no need to print debug message when kmalloc is failed. This message is redundant. The code already show us that kmalloc is failed. The braces of first if statement is remove as well because if statement has a single statement. Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/wilc1000/linux_mon.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/staging/wilc1000/linux_mon.c b/drivers/staging/wilc1000/linux_mon.c
index 1443a238a520..e9bb0ec5cbc6 100644
--- a/drivers/staging/wilc1000/linux_mon.c
+++ b/drivers/staging/wilc1000/linux_mon.c
@@ -164,14 +164,11 @@ static int mon_mgmt_tx(struct net_device *dev, const u8 *buf, size_t len)
netif_stop_queue(dev);
mgmt_tx = kmalloc(sizeof(*mgmt_tx), GFP_ATOMIC);
- if (!mgmt_tx) {
- PRINT_ER("Failed to allocate memory for mgmt_tx structure\n");
+ if (!mgmt_tx)
return -ENOMEM;
- }
mgmt_tx->buff = kmalloc(len, GFP_ATOMIC);
if (!mgmt_tx->buff) {
- PRINT_ER("Failed to allocate memory for mgmt_tx buff\n");
kfree(mgmt_tx);
return -ENOMEM;
}