staging: r8188eu :os_dep: remove condition with no effect
PATCH 1/1 staging: r8188eu :os_dep: remove condition with no effect
Remove the condition with no effect (if == else) in usb_intf.c file.
--- drivers/staging/r8188eu/os_dep/usb_intf.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/staging/r8188eu/os_dep/usb_intf.c +2 -4
@@ -496,10 +496,8 @@ static int rtw_resume(struct usb_interface *pusb_intf)struct pwrctrl_priv *pwrpriv = &padapter->pwrctrlpriv;int ret =0 ; -if (pwrpriv->bInternalAutoSuspend) - ret =rtw_resume_process (padapter); -else - ret =rtw_resume_process (padapter); + ret =rtw_resume_process (padapter); +return ret; }
--
2.32.0
Quoted 14 lines · Saurav Girepunje
Remove the condition with no effect (if == else) in
usb_intf.cfile.Signed-off-by Saurav Girepunje <[email protected]>--- drivers/staging/r8188eu/os_dep/usb_intf.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)drivers/staging/r8188eu/os_dep/usb_intf.c +0
-0@@ -496,10 +496,8 @@ static int rtw_resume(struct usb_interface *pusb_intf)struct pwrctrl_priv *pwrpriv = &padapter->pwrctrlpriv;
drivers/staging/r8188eu/os_dep/usb_intf.c static int rtw_resume(struct usb_interface *pusb_intf) · line 502
Quoted 10 lines
drivers/staging/r8188eu/os_dep/usb_intf.c +2
-4int ret =0 ; -if (pwrpriv->bInternalAutoSuspend) - ret = - else - ret = rtw_resume_process(padapter); + ret =rtw_resume_process (padapter); +return ret; }
Thanks for your patch. Perhaps this could be further simplified to:
int ret = rtw_resume_process(padapter);
return ret;
or even:
return rtw_resume_process(padapter);
Best regards,
Michael
Quoted 29 lines · Michael Straube
Quoted 13 lines · Saurav Girepunje
Remove the condition with no effect (if == else) in
usb_intf.cfile.Signed-off-by Saurav Girepunje <[email protected]>--- drivers/staging/r8188eu/os_dep/usb_intf.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)drivers/staging/r8188eu/os_dep/usb_intf.c +0
-0drivers/staging/r8188eu/os_dep/usb_intf.c static int rtw_resume(struct usb_interface *pusb_intf) · line 502
Quoted 10 lines
drivers/staging/r8188eu/os_dep/usb_intf.c +2
-3@@ -496,10 +496,8 @@ static int rtw_resume(struct usb_interface *pusb_intf)struct pwrctrl_priv *pwrpriv = &padapter->pwrctrlpriv;int ret =0 ; -if (pwrpriv->bInternalAutoSuspend) - ret = - else - ret = rtw_resume_process(padapter); + ret =rtw_resume_process (padapter); +return ret; }Thanks for your patch. Perhaps this could be further simplified to:
int ret =
rtw_resume_process(padapter);
Quoted 8 lines
return ret;
or even:
return
rtw_resume_process(padapter);Best regards,
Michael
Yes, Thanks Michael. I will make it more simple and send v2.
Regards,
Saurav