staging: wilc1000: remove unnecessary local variables
authorHimadri Pandya <himadri18.07@gmail.com>
Sat, 9 Mar 2019 15:15:06 +0000 (20:45 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 18 Mar 2019 06:05:23 +0000 (07:05 +0100)
Remove unnecessary local variable "ret" and its assignments from
functions wilc_set_tx_power and wilc_get_tx_power. Suggested by
Coccinelle.

Signed-off-by: Himadri Pandya <himadri18.07@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wilc1000/host_interface.c

index 4dd9a20f6a0bd93435a865e052abf4d68a1fbdb5..56d8ed29fff90ef065f9a440444cc65d87fcb6d9 100644 (file)
@@ -2121,7 +2121,6 @@ int wilc_setup_multicast_filter(struct wilc_vif *vif, u32 enabled, u32 count,
 
 int wilc_set_tx_power(struct wilc_vif *vif, u8 tx_power)
 {
-       int ret;
        struct wid wid;
 
        wid.id = WID_TX_POWER;
@@ -2129,15 +2128,12 @@ int wilc_set_tx_power(struct wilc_vif *vif, u8 tx_power)
        wid.val = &tx_power;
        wid.size = sizeof(char);
 
-       ret = wilc_send_config_pkt(vif, WILC_SET_CFG, &wid, 1,
+       return wilc_send_config_pkt(vif, WILC_SET_CFG, &wid, 1,
                                   wilc_get_vif_idx(vif));
-
-       return ret;
 }
 
 int wilc_get_tx_power(struct wilc_vif *vif, u8 *tx_power)
 {
-       int ret;
        struct wid wid;
 
        wid.id = WID_TX_POWER;
@@ -2145,8 +2141,6 @@ int wilc_get_tx_power(struct wilc_vif *vif, u8 *tx_power)
        wid.val = tx_power;
        wid.size = sizeof(char);
 
-       ret = wilc_send_config_pkt(vif, WILC_GET_CFG, &wid, 1,
-                                  wilc_get_vif_idx(vif));
-
-       return ret;
+       return wilc_send_config_pkt(vif, WILC_GET_CFG, &wid, 1,
+                                   wilc_get_vif_idx(vif));
 }