As _rtw_xmit_entry() would always return 0, we are save to delete the return value for it. Signed-off-by: GUO Zihua <guozihua@xxxxxxxxxx> --- drivers/staging/rtl8723bs/include/xmit_osdep.h | 2 +- drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 3 ++- drivers/staging/rtl8723bs/os_dep/xmit_linux.c | 15 +++++---------- 3 files changed, 8 insertions(+), 12 deletions(-) diff --git a/drivers/staging/rtl8723bs/include/xmit_osdep.h b/drivers/staging/rtl8723bs/include/xmit_osdep.h index e781cd5dfd01..3c1391aef093 100644 --- a/drivers/staging/rtl8723bs/include/xmit_osdep.h +++ b/drivers/staging/rtl8723bs/include/xmit_osdep.h @@ -25,7 +25,7 @@ struct sta_xmit_priv; struct xmit_frame; struct xmit_buf; -extern int _rtw_xmit_entry(struct sk_buff *pkt, struct net_device *pnetdev); +extern void _rtw_xmit_entry(struct sk_buff *pkt, struct net_device *pnetdev); extern int rtw_xmit_entry(struct sk_buff *pkt, struct net_device *pnetdev); void rtw_os_xmit_schedule(struct adapter *padapter); diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c index cb6d287f580d..c97135185c71 100644 --- a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c +++ b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c @@ -2084,7 +2084,8 @@ static netdev_tx_t rtw_cfg80211_monitor_if_xmit_entry(struct sk_buff *skb, struc memcpy(pdata + sizeof(dst_mac_addr), src_mac_addr, sizeof(src_mac_addr)); /* Use the real net device to transmit the packet */ - return _rtw_xmit_entry(skb, padapter->pnetdev); + _rtw_xmit_entry(skb, padapter->pnetdev); + return NETDEV_TX_OK; } else if ((frame_control & (IEEE80211_FCTL_FTYPE|IEEE80211_FCTL_STYPE)) == (IEEE80211_FTYPE_MGMT|IEEE80211_STYPE_ACTION)) { diff --git a/drivers/staging/rtl8723bs/os_dep/xmit_linux.c b/drivers/staging/rtl8723bs/os_dep/xmit_linux.c index 530e7a6c67c5..2b268aab4f88 100644 --- a/drivers/staging/rtl8723bs/os_dep/xmit_linux.c +++ b/drivers/staging/rtl8723bs/os_dep/xmit_linux.c @@ -181,7 +181,7 @@ static int rtw_mlcst2unicst(struct adapter *padapter, struct sk_buff *skb) return true; } -int _rtw_xmit_entry(struct sk_buff *pkt, struct net_device *pnetdev) +void _rtw_xmit_entry(struct sk_buff *pkt, struct net_device *pnetdev) { struct adapter *padapter = rtw_netdev_priv(pnetdev); struct xmit_priv *pxmitpriv = &padapter->xmitpriv; @@ -202,7 +202,7 @@ int _rtw_xmit_entry(struct sk_buff *pkt, struct net_device *pnetdev) if (pxmitpriv->free_xmitframe_cnt > (NR_XMITFRAME / 4)) { res = rtw_mlcst2unicst(padapter, pkt); if (res) - goto exit; + return; } } @@ -210,22 +210,17 @@ int _rtw_xmit_entry(struct sk_buff *pkt, struct net_device *pnetdev) if (res < 0) goto drop_packet; - goto exit; + return; drop_packet: pxmitpriv->tx_drop++; dev_kfree_skb_any(pkt); - -exit: - return 0; } int rtw_xmit_entry(struct sk_buff *pkt, struct net_device *pnetdev) { - int ret = 0; - if (pkt) - ret = _rtw_xmit_entry(pkt, pnetdev); + _rtw_xmit_entry(pkt, pnetdev); - return ret; + return 0; } -- 2.17.1