staging: rtl8188eu: os_dep: remove unused variable
authorAya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Fri, 27 Feb 2015 12:54:23 +0000 (14:54 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 2 Mar 2015 00:20:00 +0000 (16:20 -0800)
This patch removes a variable that was simply used to
store the return value of a function call before
returning it.

The issue was detected and resolved using the following
coccinelle script:

@@
identifier len,f;
@@

-int len;
 ... when != len
     when strict
-len =
+return
        f(...);
-return len;

Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c

index 24a8f5ac96e56b103b527fd2813ec54026b85542..58998f2f2b09b9eb28e5664dc5444e0ccf126b70 100644 (file)
@@ -1796,11 +1796,9 @@ static int rtw_wx_set_gen_ie(struct net_device *dev,
                             struct iw_request_info *info,
                             union iwreq_data *wrqu, char *extra)
 {
-       int ret;
        struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
 
-       ret = rtw_set_wpa_ie(padapter, extra, wrqu->data.length);
-       return ret;
+       return rtw_set_wpa_ie(padapter, extra, wrqu->data.length);
 }
 
 static int rtw_wx_set_auth(struct net_device *dev,