summaryrefslogtreecommitdiff
path: root/drivers/staging
diff options
context:
space:
mode:
authorPhillip Potter <phil@philpotter.co.uk>2022-07-29 02:11:49 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-07-29 10:33:16 +0300
commitf3a76018dd55d8ddcd28cb47049f46ae5c0ce557 (patch)
tree6d7baeb6590ea716c5e0135cf7ef67d4cfc5cb4f /drivers/staging
parentc528bbb7dc062c707f6064eec1bccafb8490758f (diff)
downloadlinux-f3a76018dd55d8ddcd28cb47049f46ae5c0ce557.tar.xz
staging: r8188eu: remove initializer from ret in rtw_pwr_wakeup
Remove the success initializer from the ret variable in rtw_pwr_wakeup, as we set it later anyway in the success path, and also set on failure. This makes the function appear cleaner and more consistent. Suggested-by: Dan Carpenter <dan.carpenter@oracle.com> Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Signed-off-by: Phillip Potter <phil@philpotter.co.uk> Link: https://lore.kernel.org/r/20220728231150.972-2-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/r8188eu/core/rtw_pwrctrl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/r8188eu/core/rtw_pwrctrl.c b/drivers/staging/r8188eu/core/rtw_pwrctrl.c
index 8b1c50668dfe..75e655bae16a 100644
--- a/drivers/staging/r8188eu/core/rtw_pwrctrl.c
+++ b/drivers/staging/r8188eu/core/rtw_pwrctrl.c
@@ -381,7 +381,7 @@ int rtw_pwr_wakeup(struct adapter *padapter)
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
unsigned long timeout = jiffies + msecs_to_jiffies(3000);
unsigned long deny_time;
- int ret = 0;
+ int ret;
while (pwrpriv->ps_processing && time_before(jiffies, timeout))
msleep(10);