Skip to content

Commit

Permalink
staging: rtl8723au: os_dep: Remove uneeded return variable
Browse files Browse the repository at this point in the history
This patch removes uneeded return variables, using only
'return _SUCCESS' instead.
It fixes the following warning detected by coccinelle:
Unneeded variable.

It was done using the following semantic patch:

@@
identifier ret;
type T;
expression e;
@@

-T ret = e;
 ... when != ret
     when strict
-return ret;
+return e;

Signed-off-by: Roberta Dobrescu <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
robertaDobrescu authored and gregkh committed Oct 27, 2014
1 parent 147e45d commit 35a0072
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/staging/rtl8723au/os_dep/os_intfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,6 @@ static int netdev_close(struct net_device *pnetdev);
static int loadparam(struct rtw_adapter *padapter, struct net_device *pnetdev)
{
struct registry_priv *registry_par = &padapter->registrypriv;
int status = _SUCCESS;

GlobalDebugLevel23A = rtw_debug;
registry_par->chip_version = (u8)rtw_chip_version;
Expand Down Expand Up @@ -234,7 +233,7 @@ static int loadparam(struct rtw_adapter *padapter, struct net_device *pnetdev)
snprintf(registry_par->if2name, 16, "%s", if2name);
registry_par->notch_filter = (u8)rtw_notch_filter;
registry_par->regulatory_tid = (u8)rtw_regulatory_id;
return status;
return _SUCCESS;
}

static int rtw_net_set_mac_address(struct net_device *pnetdev, void *p)
Expand Down Expand Up @@ -384,7 +383,6 @@ static int rtw_init_default_value(struct rtw_adapter *padapter)
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
struct security_priv *psecuritypriv = &padapter->securitypriv;
int ret = _SUCCESS;

/* xmit_priv */
pxmitpriv->vcs = pregistrypriv->vcs_type;
Expand Down Expand Up @@ -423,7 +421,7 @@ static int rtw_init_default_value(struct rtw_adapter *padapter)
/* misc. */
padapter->bReadPortCancel = false;
padapter->bWritePortCancel = false;
return ret;
return _SUCCESS;
}

int rtw_reset_drv_sw23a(struct rtw_adapter *padapter)
Expand Down

0 comments on commit 35a0072

Please sign in to comment.