Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1253128

[PATCH v2 05/15] net: wireless: ti: Return flow can be simplified for wl1271_cmd_interrogate

From Punit Vara <punitvara@gmail.com>
Newsgroups linux.kernel
Subject [PATCH v2 05/15] net: wireless: ti: Return flow can be simplified for wl1271_cmd_interrogate
Date 2015-10-21 21:10 +0200
Message-ID <qm6VP-3Hx-13@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


Remove int ret suggested by kbuild test robot

This patch is to the wlcore/acx.c file that fixes up warning
reported by coccicheck:

WARNING: end returns can be simplified if negative or 0 value

Prefer direct return value instead of writing 2-3 more sentence.

Signed-off-by: Punit Vara <punitvara@gmail.com>
---
 drivers/net/wireless/ti/wlcore/acx.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/net/wireless/ti/wlcore/acx.c b/drivers/net/wireless/ti/wlcore/acx.c
index f28fa3b..6b566d9 100644
--- a/drivers/net/wireless/ti/wlcore/acx.c
+++ b/drivers/net/wireless/ti/wlcore/acx.c
@@ -158,16 +158,11 @@ out:
 int wl1271_acx_mem_map(struct wl1271 *wl, struct acx_header *mem_map,
 		       size_t len)
 {
-	int ret;
 
 	wl1271_debug(DEBUG_ACX, "acx mem map");
 
-	ret = wl1271_cmd_interrogate(wl, ACX_MEM_MAP, mem_map,
+	return wl1271_cmd_interrogate(wl, ACX_MEM_MAP, mem_map,
 				     sizeof(struct acx_header), len);
-	if (ret < 0)
-		return ret;
-
-	return 0;
 }
 
 int wl1271_acx_rx_msdu_life_time(struct wl1271 *wl)
-- 
2.5.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH v2 05/15] net: wireless: ti: Return flow can be simplified for wl1271_cmd_interrogate Punit Vara <punitvara@gmail.com> - 2015-10-21 21:10 +0200
  [PATCH v2 08/15] net: wireless: simplify return flow for usb_control_msg Punit Vara <punitvara@gmail.com> - 2015-10-21 21:10 +0200
  Re: [PATCH v2 05/15] net: wireless: ti: Return flow can be simplified  for wl1271_cmd_interrogate Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> - 2015-10-22 00:10 +0200
  Re: [PATCH v2 05/15] net: wireless: ti: Return flow can be simplified  for wl1271_cmd_interrogate Eliad Peller <eliad@wizery.com> - 2015-10-22 09:00 +0200

csiph-web