Skip to content

Commit

Permalink
staging: rtl8723bs: remove pointless if else in rtw_sdio_resume()
Browse files Browse the repository at this point in the history
Whether any of the conditions is true or not, the return variable
is always set to rtw_resume_process(padapter). Replace the if else
construct with a single call to rtw_resume_process(). Also remove
the now unused local variable pwrpriv.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Michael Straube authored and Greg Kroah-Hartman committed Jul 2, 2018
1 parent 3b41f9b commit 0a561b0
Showing 1 changed file with 2 additions and 17 deletions.
19 changes: 2 additions & 17 deletions drivers/staging/rtl8723bs/os_dep/sdio_intf.c
Original file line number Diff line number Diff line change
Expand Up @@ -605,7 +605,6 @@ static int rtw_sdio_resume(struct device *dev)
{
struct sdio_func *func =dev_to_sdio_func(dev);
struct dvobj_priv *psdpriv = sdio_get_drvdata(func);
struct pwrctrl_priv *pwrpriv = dvobj_to_pwrctl(psdpriv);
struct adapter *padapter = psdpriv->if1;
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
int ret = 0;
Expand All @@ -615,25 +614,11 @@ static int rtw_sdio_resume(struct device *dev)

pdbgpriv->dbg_resume_cnt++;

if (pwrpriv->bInternalAutoSuspend)
{
ret = rtw_resume_process(padapter);
}
else
{
if (pwrpriv->wowlan_mode || pwrpriv->wowlan_ap_mode)
{
ret = rtw_resume_process(padapter);
}
else
{
ret = rtw_resume_process(padapter);
}
}
ret = rtw_resume_process(padapter);

pmlmeext->last_scan_time = jiffies;
DBG_871X("<======== %s return %d\n", __func__, ret);
return ret;

}

static int __init rtw_drv_entry(void)
Expand Down

0 comments on commit 0a561b0

Please sign in to comment.