Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 911f2921 authored by Heena Sirwani's avatar Heena Sirwani Committed by Greg Kroah-Hartman
Browse files

Staging: rtl8723au: os_dep: Removed variable that is always 0.



The following patch removes a variable that is always 0 using
coccinelle.
The semaintic patch used is as follows:

@@
identifier ret;
@@

-int ret = 0;
 ... when != ret
     when strict
-return ret;
+return 0;

Signed-off-by: default avatarHeena Sirwani <heenasirwani@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 15c389c1
Loading
Loading
Loading
Loading
+4 −11
Original line number Diff line number Diff line
@@ -471,7 +471,6 @@ static int rtw_cfg80211_ap_set_encryption(struct net_device *dev, u8 key_index,
					  int set_tx, const u8 *sta_addr,
					  struct key_params *keyparms)
{
	int ret = 0;
	int key_len;
	struct sta_info *psta = NULL, *pbcmc_sta = NULL;
	struct rtw_adapter *padapter = netdev_priv(dev);
@@ -708,7 +707,7 @@ static int rtw_cfg80211_ap_set_encryption(struct net_device *dev, u8 key_index,

exit:

	return ret;
	return 0;
}
#endif

@@ -2432,20 +2431,16 @@ void rtw_cfg80211_indicate_sta_disassoc(struct rtw_adapter *padapter,

static int rtw_cfg80211_monitor_if_open(struct net_device *ndev)
{
	int ret = 0;

	DBG_8723A("%s\n", __func__);

	return ret;
	return 0;
}

static int rtw_cfg80211_monitor_if_close(struct net_device *ndev)
{
	int ret = 0;

	DBG_8723A("%s\n", __func__);

	return ret;
	return 0;
}

static int rtw_cfg80211_monitor_if_xmit_entry(struct sk_buff *skb,
@@ -2574,11 +2569,9 @@ static int rtw_cfg80211_monitor_if_xmit_entry(struct sk_buff *skb,
static int
rtw_cfg80211_monitor_if_set_mac_address(struct net_device *ndev, void *addr)
{
	int ret = 0;

	DBG_8723A("%s\n", __func__);

	return ret;
	return 0;
}

static const struct net_device_ops rtw_cfg80211_monitor_if_ops = {