From: Bhaktipriya Shridhar Date: Wed, 24 Feb 2016 20:27:54 +0000 (+0530) Subject: staging: wilc1000: Remove useless return variables X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0c9e21d397908201f28c5352cf05942d9954b736;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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; ) Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/wilc1000/wilc_wlan.c b/drivers/staging/wilc1000/wilc_wlan.c index 1f24828ff2e0..002062059390 100644 --- a/drivers/staging/wilc1000/wilc_wlan.c +++ b/drivers/staging/wilc1000/wilc_wlan.c @@ -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,