staging: wilc1000: Remove return variable from host_interface.c
authorNishka Dasgupta <nishka.dasgupta@yahoo.com>
Thu, 21 Mar 2019 19:55:55 +0000 (01:25 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 22 Mar 2019 14:16:28 +0000 (15:16 +0100)
Remove return variable from host_interface.c. Issue found with
Coccinelle using ret.cocci.

Signed-off-by: Nishka Dasgupta <nishka.dasgupta@yahoo.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wilc1000/host_interface.c

index 56d8ed29fff90ef065f9a440444cc65d87fcb6d9..44556b22613eb866cb35a207e831989c8358d38d 100644 (file)
@@ -1358,17 +1358,14 @@ int wilc_add_rx_gtk(struct wilc_vif *vif, const u8 *rx_gtk, u8 gtk_key_len,
 int wilc_set_pmkid_info(struct wilc_vif *vif, struct wilc_pmkid_attr *pmkid)
 {
        struct wid wid;
-       int result;
 
        wid.id = WID_PMKID_INFO;
        wid.type = WID_STR;
        wid.size = (pmkid->numpmkid * sizeof(struct wilc_pmkid)) + 1;
        wid.val = (u8 *)pmkid;
 
-       result = wilc_send_config_pkt(vif, WILC_SET_CFG, &wid, 1,
-                                     wilc_get_vif_idx(vif));
-
-       return result;
+       return wilc_send_config_pkt(vif, WILC_SET_CFG, &wid, 1,
+                                   wilc_get_vif_idx(vif));
 }
 
 int wilc_get_mac_address(struct wilc_vif *vif, u8 *mac_addr)
@@ -1402,10 +1399,8 @@ int wilc_set_join_req(struct wilc_vif *vif, u8 *bssid, const u8 *ies,
        if (ies) {
                conn_info->req_ies_len = ies_len;
                conn_info->req_ies = kmemdup(ies, ies_len, GFP_KERNEL);
-               if (!conn_info->req_ies) {
-                       result = -ENOMEM;
-                       return result;
-               }
+               if (!conn_info->req_ies)
+                       return -ENOMEM;
        }
 
        result = wilc_send_connect_wid(vif);
@@ -1570,7 +1565,6 @@ int wilc_hif_set_cfg(struct wilc_vif *vif, struct cfg_param_attr *param)
 {
        struct wid wid_list[4];
        int i = 0;
-       int result;
 
        if (param->flag & WILC_CFG_PARAM_RETRY_SHORT) {
                wid_list[i].id = WID_SHORT_RETRY_LIMIT;
@@ -1601,10 +1595,8 @@ int wilc_hif_set_cfg(struct wilc_vif *vif, struct cfg_param_attr *param)
                i++;
        }
 
-       result = wilc_send_config_pkt(vif, WILC_SET_CFG, wid_list,
-                                     i, wilc_get_vif_idx(vif));
-
-       return result;
+       return wilc_send_config_pkt(vif, WILC_SET_CFG, wid_list,
+                                   i, wilc_get_vif_idx(vif));
 }
 
 static void get_periodic_rssi(struct timer_list *t)