linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/7] staging: wilc1000: handle_set_mac_address: remove debug message of kmalloc failure
@ 2016-02-16  8:39 Chaehyun Lim
  2016-02-16  8:39 ` [PATCH 2/7] staging: wilc1000: handle_set_mac_address: fix kmalloc return error code Chaehyun Lim
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Chaehyun Lim @ 2016-02-16  8:39 UTC (permalink / raw)
  To: gregkh
  Cc: johnny.kim, austin.shin, chris.park, tony.cho, glen.lee, leo.kim,
	linux-wireless, devel, Chaehyun Lim

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 brace of if statement is remove as well due to have a single
statement.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
---
 drivers/staging/wilc1000/host_interface.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
index d1eedfb..579b90a 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -431,10 +431,9 @@ static s32 handle_set_mac_address(struct wilc_vif *vif,
 	struct wid wid;
 	u8 *mac_buf = kmalloc(ETH_ALEN, GFP_KERNEL);
 
-	if (!mac_buf) {
-		PRINT_ER("No buffer to send mac address\n");
+	if (!mac_buf)
 		return -EFAULT;
-	}
+
 	memcpy(mac_buf, set_mac_addr->mac_addr, ETH_ALEN);
 
 	wid.id = (u16)WID_MAC_ADDR;
-- 
2.7.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-02-16  8:40 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-16  8:39 [PATCH 1/7] staging: wilc1000: handle_set_mac_address: remove debug message of kmalloc failure Chaehyun Lim
2016-02-16  8:39 ` [PATCH 2/7] staging: wilc1000: handle_set_mac_address: fix kmalloc return error code Chaehyun Lim
2016-02-16  8:39 ` [PATCH 3/7] staging: wilc1000: handle_set_mac_address: use kmemdup Chaehyun Lim
2016-02-16  8:39 ` [PATCH 4/7] staging: wilc1000: handle_set_mac_address: change return type to void Chaehyun Lim
2016-02-16  8:39 ` [PATCH 5/7] staging: wilc1000: handle_set_mac_address: change data type of result Chaehyun Lim
2016-02-16  8:39 ` [PATCH 6/7] staging: wilc1000: handle_set_mac_address: rename result Chaehyun Lim
2016-02-16  8:39 ` [PATCH 7/7] staging: wilc1000: handle_set_mac_address: use netdev_err Chaehyun Lim

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).