From: Jes Sorensen Date: Sun, 25 May 2014 20:43:14 +0000 (+0200) Subject: staging: rtl8723au: _cfg80211_rtw_mgmt_tx() clean up checking function return values X-Git-Tag: v3.16-rc1~30^2~36^2~228 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=de62f67a00286eb78d44762ce845b00742d79dd0;p=platform%2Fkernel%2Flinux-stable.git staging: rtl8723au: _cfg80211_rtw_mgmt_tx() clean up checking function return values Signed-off-by: Jes Sorensen Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c b/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c index 09e6e8180c76..5f508ac765e2 100644 --- a/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c +++ b/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c @@ -3055,7 +3055,6 @@ static int _cfg80211_rtw_mgmt_tx(struct rtw_adapter *padapter, u8 tx_ch, struct pkt_attrib *pattrib; unsigned char *pframe; int ret = _FAIL; - bool ack = true; struct ieee80211_hdr *pwlanhdr; struct xmit_priv *pxmitpriv = &padapter->xmitpriv; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; @@ -3079,7 +3078,7 @@ static int _cfg80211_rtw_mgmt_tx(struct rtw_adapter *padapter, u8 tx_ch, /* starting alloc mgmt frame to dump it */ pmgntframe = alloc_mgtxmitframe23a(pxmitpriv); - if (pmgntframe == NULL) { + if (!pmgntframe) { /* ret = -ENOMEM; */ ret = _FAIL; goto exit; @@ -3105,15 +3104,12 @@ static int _cfg80211_rtw_mgmt_tx(struct rtw_adapter *padapter, u8 tx_ch, pattrib->last_txcmdsz = pattrib->pktlen; - if (dump_mgntframe23a_and_wait_ack23a(padapter, pmgntframe) != _SUCCESS) { - ack = false; - ret = _FAIL; + ret = dump_mgntframe23a_and_wait_ack23a(padapter, pmgntframe); - DBG_8723A("%s, ack == _FAIL\n", __func__); - } else { - DBG_8723A("%s, ack =%d, ok!\n", __func__, ack); - ret = _SUCCESS; - } + if (ret != _SUCCESS) + DBG_8723A("%s, ack == false\n", __func__); + else + DBG_8723A("%s, ack == true\n", __func__); exit: