staging: wilc1000: Remove useless return variables
authorBhaktipriya Shridhar <bhaktipriya96@gmail.com>
Wed, 24 Feb 2016 20:27:54 +0000 (01:57 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 26 Feb 2016 06:29:41 +0000 (22:29 -0800)
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;
)

Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wilc1000/wilc_wlan.c

index 1f24828ff2e0f2b919aa2cac67b0dbba999f0ded..002062059390b35a152097abb0c8eac1ec5c89e8 100644 (file)
@@ -1301,11 +1301,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,