From: Martin Kaiser Date: Wed, 13 Apr 2022 19:36:50 +0000 (+0200) Subject: staging: r8188eu: summarize two if statements X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=294e69c69c4d4a4e29dda2a0b5a5c11cf53ea7f4;p=linux.git staging: r8188eu: summarize two if statements Summarize two if statements in rtw_pwr_wakeup and place the constants on the right side of the comparison. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20220413193654.258507-5-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/r8188eu/core/rtw_pwrctrl.c b/drivers/staging/r8188eu/core/rtw_pwrctrl.c index fd7ea83968ed3..ff96e5229b523 100644 --- a/drivers/staging/r8188eu/core/rtw_pwrctrl.c +++ b/drivers/staging/r8188eu/core/rtw_pwrctrl.c @@ -394,11 +394,10 @@ int rtw_pwr_wakeup(struct adapter *padapter) ret = _SUCCESS; goto exit; } - if (rf_off == pwrpriv->rf_pwrstate) { - if (_FAIL == ips_leave(padapter)) { - ret = _FAIL; - goto exit; - } + + if (pwrpriv->rf_pwrstate == rf_off && ips_leave(padapter) == _FAIL) { + ret = _FAIL; + goto exit; } if (padapter->bDriverStopped || !padapter->bup || !padapter->hw_init_completed) {