Return-path: Received: from eusmtp01.atmel.com ([212.144.249.243]:40556 "EHLO eusmtp01.atmel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030335AbcBRHcg (ORCPT ); Thu, 18 Feb 2016 02:32:36 -0500 From: Leo Kim To: CC: , , , , , , , , , Chris Park Subject: [PATCH 16/24] staging: wilc1000: host_interface.c: removes unnecessary log messages Date: Thu, 18 Feb 2016 16:27:27 +0900 Message-ID: <1455780455-21365-16-git-send-email-leo.kim@atmel.com> (sfid-20160218_083240_010273_36C8A6A8) In-Reply-To: <1455780455-21365-1-git-send-email-leo.kim@atmel.com> References: <1455780455-21365-1-git-send-email-leo.kim@atmel.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-wireless-owner@vger.kernel.org List-ID: From: Chris Park This patch removes unnecessary log messages. Signed-off-by: Chris Park Signed-off-by: Leo Kim --- drivers/staging/wilc1000/host_interface.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index ee45103..60678aa 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -1643,11 +1643,8 @@ static int Handle_Key(struct wilc_vif *vif, pu8keybuf = kmalloc(pstrHostIFkeyAttr->attr.wep.key_len + 2, GFP_KERNEL); - - if (pu8keybuf == NULL) { - PRINT_ER("No buffer to send Key\n"); + if (!pu8keybuf) return -ENOMEM; - } pu8keybuf[0] = pstrHostIFkeyAttr->attr.wep.index; pu8keybuf[1] = pstrHostIFkeyAttr->attr.wep.key_len; @@ -1668,10 +1665,8 @@ static int Handle_Key(struct wilc_vif *vif, kfree(pu8keybuf); } else if (pstrHostIFkeyAttr->action & ADDKEY) { pu8keybuf = kmalloc(pstrHostIFkeyAttr->attr.wep.key_len + 2, GFP_KERNEL); - if (!pu8keybuf) { - PRINT_ER("No buffer to send Key\n"); + if (!pu8keybuf) return -ENOMEM; - } pu8keybuf[0] = pstrHostIFkeyAttr->attr.wep.index; memcpy(pu8keybuf + 1, &pstrHostIFkeyAttr->attr.wep.key_len, 1); memcpy(pu8keybuf + 2, pstrHostIFkeyAttr->attr.wep.key, @@ -1715,7 +1710,6 @@ static int Handle_Key(struct wilc_vif *vif, if (pstrHostIFkeyAttr->action & ADDKEY_AP) { pu8keybuf = kzalloc(RX_MIC_KEY_MSG_LEN, GFP_KERNEL); if (!pu8keybuf) { - PRINT_ER("No buffer to send RxGTK Key\n"); ret = -ENOMEM; goto _WPARxGtk_end_case_; } @@ -1747,7 +1741,6 @@ static int Handle_Key(struct wilc_vif *vif, } else if (pstrHostIFkeyAttr->action & ADDKEY) { pu8keybuf = kzalloc(RX_MIC_KEY_MSG_LEN, GFP_KERNEL); if (pu8keybuf == NULL) { - PRINT_ER("No buffer to send RxGTK Key\n"); ret = -ENOMEM; goto _WPARxGtk_end_case_; } @@ -1787,7 +1780,6 @@ _WPARxGtk_end_case_: if (pstrHostIFkeyAttr->action & ADDKEY_AP) { pu8keybuf = kmalloc(PTK_KEY_MSG_LEN + 1, GFP_KERNEL); if (!pu8keybuf) { - PRINT_ER("No buffer to send PTK Key\n"); ret = -ENOMEM; goto _WPAPtk_end_case_; } -- 1.9.1