Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

staging: rtl8188eu: remove return variable from rtw_pwr_unassociated_idle

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>

authored by

Michael Straube and committed by
Greg Kroah-Hartman
a426b982 4905084a

+3 -7
+3 -7
drivers/staging/rtl8188eu/core/rtw_pwrctrl.c
··· 201 201 static bool rtw_pwr_unassociated_idle(struct adapter *adapter) 202 202 { 203 203 struct mlme_priv *pmlmepriv = &adapter->mlmepriv; 204 - bool ret = false; 205 204 206 205 if (time_after_eq(adapter->pwrctrlpriv.ips_deny_time, jiffies)) 207 - goto exit; 206 + return false; 208 207 209 208 if (check_fwstate(pmlmepriv, WIFI_ASOC_STATE|WIFI_SITE_MONITOR) || 210 209 check_fwstate(pmlmepriv, WIFI_UNDER_LINKING|WIFI_UNDER_WPS) || 211 210 check_fwstate(pmlmepriv, WIFI_AP_STATE) || 212 211 check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE|WIFI_ADHOC_STATE)) 213 - goto exit; 212 + return false; 214 213 215 - ret = true; 216 - 217 - exit: 218 - return ret; 214 + return true; 219 215 } 220 216 221 217 void rtw_ps_processor(struct adapter *padapter)