]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
staging: rtl8712: Remove return variable of different type
authorNishka Dasgupta <nishkadg.linux@gmail.com>
Wed, 29 May 2019 13:24:57 +0000 (18:54 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 30 May 2019 21:13:45 +0000 (14:13 -0700)
The local return variable ret may be replaced directly by its value,
especially since its type (uint) is not the same as the function's
return type (int).
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8712/rtl871x_ioctl_linux.c

index a7230c0c7b23e3b19d1c7ed5cff194fc8fa2fd5f..b424b8436fcfb52e40f051af624c72e92c1a1aaf 100644 (file)
@@ -1577,7 +1577,7 @@ static int r8711_wx_get_enc(struct net_device *dev,
                                struct iw_request_info *info,
                                union iwreq_data *wrqu, char *keybuf)
 {
-       uint key, ret = 0;
+       uint key;
        struct _adapter *padapter = netdev_priv(dev);
        struct iw_point *erq = &(wrqu->encoding);
        struct  mlme_priv       *pmlmepriv = &(padapter->mlmepriv);
@@ -1633,7 +1633,7 @@ static int r8711_wx_get_enc(struct net_device *dev,
                erq->flags |= IW_ENCODE_DISABLED;
                break;
        }
-       return ret;
+       return 0;
 }
 
 static int r8711_wx_get_power(struct net_device *dev,