diff options
author | Nachammai Karuppiah <nachukannan@gmail.com> | 2019-11-04 20:51:23 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-11-05 18:00:12 +0100 |
commit | 55238d7a468d5328a0f7b7155ea8855f158cbcc5 (patch) | |
tree | 77de65ae509b11b260dadbb24ea1668547ed4e9b /drivers/staging | |
parent | b7aa39a2ed0112d07fc277ebd24a08a7b2368ab9 (diff) | |
download | linux-55238d7a468d5328a0f7b7155ea8855f158cbcc5.tar.bz2 |
staging: rtl8723bs: os_dep: Remove unnecessary variable used in return statement
Remove the variable that is used only in return statement and return the
expression itself. Issue found using coccinelle.
Signed-off-by: Nachammai Karuppiah <nachukannan@gmail.com>
Link: https://lore.kernel.org/r/1572929483-78993-1-git-send-email-nachukannan@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c index a25c535b6b4f..52c1f6625038 100644 --- a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c +++ b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c @@ -2440,7 +2440,6 @@ void rtw_cfg80211_indicate_sta_disassoc(struct adapter *padapter, unsigned char static netdev_tx_t rtw_cfg80211_monitor_if_xmit_entry(struct sk_buff *skb, struct net_device *ndev) { - int ret = 0; int rtap_len; int qos_len = 0; int dot11_hdr_len = 24; @@ -2506,9 +2505,7 @@ static netdev_tx_t rtw_cfg80211_monitor_if_xmit_entry(struct sk_buff *skb, struc DBG_8192C("should be eapol packet\n"); /* Use the real net device to transmit the packet */ - ret = _rtw_xmit_entry(skb, padapter->pnetdev); - - return ret; + return _rtw_xmit_entry(skb, padapter->pnetdev); } else if ((frame_control & (IEEE80211_FCTL_FTYPE|IEEE80211_FCTL_STYPE)) @@ -2815,14 +2812,11 @@ static int cfg80211_rtw_start_ap(struct wiphy *wiphy, struct net_device *ndev, static int cfg80211_rtw_change_beacon(struct wiphy *wiphy, struct net_device *ndev, struct cfg80211_beacon_data *info) { - int ret = 0; struct adapter *adapter = (struct adapter *)rtw_netdev_priv(ndev); DBG_871X(FUNC_NDEV_FMT"\n", FUNC_NDEV_ARG(ndev)); - ret = rtw_add_beacon(adapter, info->head, info->head_len, info->tail, info->tail_len); - - return ret; + return rtw_add_beacon(adapter, info->head, info->head_len, info->tail, info->tail_len); } static int cfg80211_rtw_stop_ap(struct wiphy *wiphy, struct net_device *ndev) |