lkml.org 
[lkml]   [2022]   [Oct]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v3 1/4] staging: r8188eu: remove unnecessary variable in ioctl_linux
Date
Returning value 0 directly instead of storing it in variable ret.
This commit can prevent cocci warning as follows:

Unneeded variable: "ret". Return "0" on line 3030

Signed-off-by: Kang Minchul <tegongkang@gmail.com>
---
drivers/staging/r8188eu/os_dep/ioctl_linux.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/staging/r8188eu/os_dep/ioctl_linux.c b/drivers/staging/r8188eu/os_dep/ioctl_linux.c
index 2de2e1e32738..5e1ad7733127 100644
--- a/drivers/staging/r8188eu/os_dep/ioctl_linux.c
+++ b/drivers/staging/r8188eu/os_dep/ioctl_linux.c
@@ -2979,8 +2979,6 @@ static int rtw_p2p_set(struct net_device *dev,
struct iw_request_info *info,
union iwreq_data *wrqu, char *extra)
{
- int ret = 0;
-
if (!memcmp(extra, "enable =", 7)) {
rtw_wext_p2p_enable(dev, info, wrqu, &extra[7]);
} else if (!memcmp(extra, "setDN =", 6)) {
@@ -3027,7 +3025,7 @@ static int rtw_p2p_set(struct net_device *dev,
rtw_p2p_set_persistent(dev, info, wrqu, &extra[11]);
}

- return ret;
+ return 0;
}

static int rtw_p2p_get2(struct net_device *dev,
--
2.34.1
\
 
 \ /
  Last update: 2022-10-25 19:07    [W:0.047 / U:0.376 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site