* [PATCH] staging: r8188eu: Remove unneeded variable ret in rtw_suspend()
@ 2022-04-22 2:10 Wan Jiabing
0 siblings, 0 replies; only message in thread
From: Wan Jiabing @ 2022-04-22 2:10 UTC (permalink / raw)
To: Larry Finger, Phillip Potter, Greg Kroah-Hartman, Martin Kaiser,
Michael Straube, Pavel Skripkin, linux-staging, linux-kernel
Cc: kael_w, Wan Jiabing
Fix the following coccicheck error:
drivers/staging/r8188eu/os_dep/usb_intf.c:202:5-8: Unneeded variable: "ret". Return "0" on line 242
Signed-off-by: Wan Jiabing <wanjiabing@vivo.com>
---
drivers/staging/r8188eu/os_dep/usb_intf.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/staging/r8188eu/os_dep/usb_intf.c b/drivers/staging/r8188eu/os_dep/usb_intf.c
index 7bd5ab7e5248..68869c5daeff 100644
--- a/drivers/staging/r8188eu/os_dep/usb_intf.c
+++ b/drivers/staging/r8188eu/os_dep/usb_intf.c
@@ -199,8 +199,6 @@ static int rtw_suspend(struct usb_interface *pusb_intf, pm_message_t message)
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
struct pwrctrl_priv *pwrpriv = &padapter->pwrctrlpriv;
- int ret = 0;
-
if ((!padapter->bup) || (padapter->bDriverStopped) ||
(padapter->bSurpriseRemoved))
goto exit;
@@ -239,7 +237,7 @@ static int rtw_suspend(struct usb_interface *pusb_intf, pm_message_t message)
rtw_indicate_disconnect(padapter);
exit:
- return ret;
+ return 0;
}
static int rtw_resume(struct usb_interface *pusb_intf)
--
2.35.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2022-04-22 2:11 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-22 2:10 [PATCH] staging: r8188eu: Remove unneeded variable ret in rtw_suspend() Wan Jiabing
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).