linux-staging.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [PATCH V2] staging: r8188eu: Directly return _SUCCESS instead of using local ret variable
@ 2022-03-28  8:43 Haowen Bai
  2022-03-28  8:47 ` Greg KH
  0 siblings, 1 reply; 12+ messages in thread
From: Haowen Bai @ 2022-03-28  8:43 UTC (permalink / raw)
  To: Larry.Finger, phil, gregkh, straube.linux, martin
  Cc: linux-staging, linux-kernel, Haowen Bai

fixes coccinelle warning:
./drivers/staging/r8188eu/core/rtw_mlme_ext.c:357:5-8: Unneeded variable: "res".
 Return "_SUCCESS" on line 380

Signed-off-by: Haowen Bai <baihaowen@meizu.com>
---
V1->V2: split into two patches.

 drivers/staging/r8188eu/core/rtw_mlme_ext.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
index 931e6f2..4b7b0ee 100644
--- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c
+++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
@@ -354,7 +354,6 @@ static u8 init_channel_set(struct adapter *padapter, u8 ChannelPlan, struct rt_c
 
 int	init_mlme_ext_priv(struct adapter *padapter)
 {
-	int	res = _SUCCESS;
 	struct registry_priv *pregistrypriv = &padapter->registrypriv;
 	struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
 	struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
@@ -377,7 +376,7 @@ int	init_mlme_ext_priv(struct adapter *padapter)
 
 	pmlmeext->active_keep_alive_check = true;
 
-	return res;
+	return _SUCCESS;
 }
 
 void free_mlme_ext_priv(struct mlme_ext_priv *pmlmeext)
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2022-03-30  7:21 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-28  8:43 [PATCH V2] staging: r8188eu: Directly return _SUCCESS instead of using local ret variable Haowen Bai
2022-03-28  8:47 ` Greg KH
2022-03-28  9:07   ` 答复: " 白浩文
2022-03-28  9:12     ` Greg KH
2022-03-29  9:59       ` baihaowen
2022-03-29 11:06         ` [PATCH] " Haowen Bai
2022-03-29 11:09           ` [PATCH V3] " Haowen Bai
2022-03-29 11:28             ` Dan Carpenter
2022-03-30  1:14               ` baihaowen
2022-03-30  1:28                 ` [PATCH V4] " Haowen Bai
2022-03-30  7:20                   ` Dan Carpenter
2022-03-29 11:26           ` [PATCH] " Dan Carpenter

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).