diff options
| author | Kang Minchul <tegongkang@gmail.com> | 2022-10-26 02:06:18 +0900 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-10-31 09:05:17 +0100 |
| commit | cbcab58a7cbf51e0e1e8e5dec0bd44be48e966db (patch) | |
| tree | 29811ef3f9718f3d4b6471b9f497713a484787f9 | |
| parent | 737143dc87dfd3cb600a46092387c9caa814ce88 (diff) | |
| download | linux-cbcab58a7cbf51e0e1e8e5dec0bd44be48e966db.tar.gz linux-cbcab58a7cbf51e0e1e8e5dec0bd44be48e966db.zip | |
staging: r8188eu: remove unnecessary variable in ioctl_linux
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
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Kang Minchul <tegongkang@gmail.com>
Link: https://lore.kernel.org/r/20221025170621.271903-2-tegongkang@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| -rw-r--r-- | drivers/staging/r8188eu/os_dep/ioctl_linux.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/staging/r8188eu/os_dep/ioctl_linux.c b/drivers/staging/r8188eu/os_dep/ioctl_linux.c index 22aab3f986b4..f3b3d7468539 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, |
