Skip to content

Commit f3a7601

Browse files
PhilPottergregkh
authored andcommitted
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>
1 parent c528bbb commit f3a7601

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/staging/r8188eu/core/rtw_pwrctrl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ int rtw_pwr_wakeup(struct adapter *padapter)
381381
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
382382
unsigned long timeout = jiffies + msecs_to_jiffies(3000);
383383
unsigned long deny_time;
384-
int ret = 0;
384+
int ret;
385385

386386
while (pwrpriv->ps_processing && time_before(jiffies, timeout))
387387
msleep(10);

0 commit comments

Comments
 (0)