staging: rtl8188eu: remove return variable from rtw_pwr_unassociated_idle
authorMichael Straube <straube.linux@gmail.com>
Sat, 23 Nov 2019 15:16:35 +0000 (16:16 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 10 Dec 2019 09:38:38 +0000 (10:38 +0100)
Function rtw_pwr_unassociated_idle returns boolean values.
Remove the return variable ret and the exit label to simplify the
function a little bit. Return true or false directly instead.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Link: https://lore.kernel.org/r/20191123151635.155138-3-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8188eu/core/rtw_pwrctrl.c

index 8e99e10c1fd4957af1df0f2f33585dc1ebf7b1a3..c4f58507dbfd0e879994bccf29be1f5886a73586 100644 (file)
@@ -201,21 +201,17 @@ int ips_leave(struct adapter *padapter)
 static bool rtw_pwr_unassociated_idle(struct adapter *adapter)
 {
        struct mlme_priv *pmlmepriv = &adapter->mlmepriv;
-       bool ret = false;
 
        if (time_after_eq(adapter->pwrctrlpriv.ips_deny_time, jiffies))
-               goto exit;
+               return false;
 
        if (check_fwstate(pmlmepriv, WIFI_ASOC_STATE|WIFI_SITE_MONITOR) ||
            check_fwstate(pmlmepriv, WIFI_UNDER_LINKING|WIFI_UNDER_WPS) ||
            check_fwstate(pmlmepriv, WIFI_AP_STATE) ||
            check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE|WIFI_ADHOC_STATE))
-               goto exit;
-
-       ret = true;
+               return false;
 
-exit:
-       return ret;
+       return true;
 }
 
 void rtw_ps_processor(struct adapter *padapter)