staging: r8188eu: remove unneeded variable in rtw_p2p_get
authorAbdun Nihaal <abdun.nihaal@gmail.com>
Sat, 29 Jan 2022 16:27:55 +0000 (21:57 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 31 Jan 2022 13:02:47 +0000 (14:02 +0100)
Remove unneeded return variable that is initialized to 0 and not
assigned after.

Found using Coccinelle

Signed-off-by: Abdun Nihaal <abdun.nihaal@gmail.com>
Link: https://lore.kernel.org/r/6c992e9481c7481aa5931635e162dd7a4400a2e2.1643466748.git.abdun.nihaal@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/r8188eu/os_dep/ioctl_linux.c

index f99942417a71dc170c264aff212fc58b243744d9..bc5c8454ebcf8ca0cf60e08825494f20c2a01c6c 100644 (file)
@@ -3422,8 +3422,6 @@ static int rtw_p2p_get(struct net_device *dev,
                               struct iw_request_info *info,
                               union iwreq_data *wrqu, char *extra)
 {
-       int ret = 0;
-
        struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
 
        if (padapter->bShowGetP2PState)
@@ -3447,7 +3445,7 @@ static int rtw_p2p_get(struct net_device *dev,
        } else if (!memcmp(wrqu->data.pointer, "op_ch", 5)) {
                rtw_p2p_get_op_ch(dev, info, wrqu, extra);
        }
-       return ret;
+       return 0;
 }
 
 static int rtw_p2p_get2(struct net_device *dev,