staging: r8188eu: remove unneeded variable in rtw_p2p_get_device_name
authorAbdun Nihaal <abdun.nihaal@gmail.com>
Sat, 29 Jan 2022 16:27:59 +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/d94c3029128b9c094bf4e0b2e4574a177aef46e9.1643466748.git.abdun.nihaal@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/r8188eu/os_dep/ioctl_linux.c

index 6d72b15541ab31b03c5debb800abf0d8c58b9903..33fe8e944df492c55a2990bf4276a496c9c58b42 100644 (file)
@@ -2844,7 +2844,6 @@ static int rtw_p2p_get_device_name(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);
        u8 peerMAC[ETH_ALEN] = {0x00};
        int jj, kk;
@@ -2903,7 +2902,7 @@ static int rtw_p2p_get_device_name(struct net_device *dev,
 
        if (copy_to_user(wrqu->data.pointer, dev_name_str, 5 + ((dev_len > 17) ? dev_len : 17)))
                return -EFAULT;
-       return ret;
+       return 0;
 }
 
 static int rtw_p2p_get_invitation_procedure(struct net_device *dev,