Skip to contentSkip to conversation

staging: wilc1000: Remove useless return variables

PATCH Superseded Bhaktipriya Shridhar 1 participant 1 message Feb 25, 2016 Staging

v2 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 6/8 staging: wilc1000: Remove useless return variables

This patch removes unnecessary return variables and compresses the return logic.
The coccinelle script that finds and fixes this issue is:

@@ type T; identifier i,f; constant C; @@
- T i;
...when != i
when strict
( return -C;
|
- i =
+ return
f(...);
- return i;
)

---
Changes in v2:
-No change

 drivers/staging/wilc1000/wilc_wlan.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
drivers/staging/wilc1000/wilc_wlan.c +1 -5
index 391173b..04518d6 100644
@@ -1330,11 +1330,7 @@ int wilc_wlan_cfg_get(struct wilc_vif *vif, int start, u32 wid, int commit,
 
 int wilc_wlan_cfg_get_val(u32 wid, u8 *buffer, u32 buffer_size)
 {
-	int ret;
-
-	ret = wilc_wlan_cfg_get_wid_value((u16)wid, buffer, buffer_size);
-
-	return ret;
+	return wilc_wlan_cfg_get_wid_value((u16)wid, buffer, buffer_size);
 }
 
 int wilc_send_config_pkt(struct wilc_vif *vif, u8 mode, struct wid *wids,

--
2.1.4