]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
staging: rtlwifi: btcoexist: Compress two lines into one line
authorPayal Kshirsagar <payal.s.kshirsagar.98@gmail.com>
Sun, 31 Mar 2019 14:41:31 +0000 (20:11 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 1 Apr 2019 17:22:22 +0000 (19:22 +0200)
Challenge suggested by coccinelle.
Compresses two lines into one line and remove unnecessary variable.

Signed-off-by: Payal Kshirsagar <payal.s.kshirsagar.98@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtlwifi/btcoexist/halbtcoutsrc.c

index 9198189e47999cc70c57e594d2d3e0924976b4e5..2354032fad136f2e840f0ec288cd38cc4727b834 100644 (file)
@@ -456,7 +456,6 @@ static u32 halbtc_get_wifi_link_status(struct btc_coexist *btcoexist)
         */
        struct rtl_priv *rtlpriv = btcoexist->adapter;
        struct rtl_mac *mac = rtl_mac(rtlpriv);
-       u32 ret_val = 0;
        u32 port_connected_status = 0, num_of_connected_port = 0;
 
        if (mac->opmode == NL80211_IFTYPE_STATION &&
@@ -471,9 +470,7 @@ static u32 halbtc_get_wifi_link_status(struct btc_coexist *btcoexist)
        }
        /* TODO: P2P Connected Status */
 
-       ret_val = (num_of_connected_port << 16) | port_connected_status;
-
-       return ret_val;
+       return (num_of_connected_port << 16) | port_connected_status;
 }
 
 static bool halbtc_get(void *void_btcoexist, u8 get_type, void *out_buf)