staging: rtl8712: Remove unnecessary ret variable
authorJoseph Bisch <joseph.bisch@gmail.com>
Sun, 14 Feb 2016 21:57:27 +0000 (16:57 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 15 Feb 2016 00:49:09 +0000 (16:49 -0800)
Since the variable ret is set at the beginning of the function and
never changes its value, we can just return the value it was set to.

Found using coccinelle with misc/returnvar.cocci.

Signed-off-by: Joseph Bisch <joseph.bisch@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8712/os_intfs.c

index b89e2d3c4fe19da60e73211b1841bd6442a1a85e..ab19112eae13104330da4b7776f410eee412187e 100644 (file)
@@ -269,7 +269,6 @@ void r8712_stop_drv_timers(struct _adapter *padapter)
 
 static u8 init_default_value(struct _adapter *padapter)
 {
-       u8 ret  = _SUCCESS;
        struct registry_priv *pregistrypriv = &padapter->registrypriv;
        struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
        struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
@@ -302,7 +301,7 @@ static u8 init_default_value(struct _adapter *padapter)
        r8712_init_registrypriv_dev_network(padapter);
        r8712_update_registrypriv_dev_network(padapter);
        /*misc.*/
-       return ret;
+       return _SUCCESS;
 }
 
 u8 r8712_init_drv_sw(struct _adapter *padapter)