From: Jes Sorensen <jes.soren...@redhat.com> Signed-off-by: Jes Sorensen <jes.soren...@redhat.com> --- drivers/staging/rtl8723au/core/rtw_mlme_ext.c | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-)
diff --git a/drivers/staging/rtl8723au/core/rtw_mlme_ext.c b/drivers/staging/rtl8723au/core/rtw_mlme_ext.c index a994f14..e1b28a2 100644 --- a/drivers/staging/rtl8723au/core/rtw_mlme_ext.c +++ b/drivers/staging/rtl8723au/core/rtw_mlme_ext.c @@ -2467,7 +2467,8 @@ void issue_beacon23a(struct rtw_adapter *padapter, int timeout_ms) /* DBG_8723A("%s\n", __func__); */ - if ((pmgntframe = alloc_mgtxmitframe23a(pxmitpriv)) == NULL) { + pmgntframe = alloc_mgtxmitframe23a(pxmitpriv); + if (!pmgntframe) { DBG_8723A("%s, alloc mgnt frame fail\n", __func__); return; } @@ -2843,7 +2844,8 @@ static int _issue_probereq(struct rtw_adapter *padapter, RT_TRACE(_module_rtl871x_mlme_c_, _drv_notice_, ("+%s\n", __func__)); - if ((pmgntframe = alloc_mgtxmitframe23a(pxmitpriv)) == NULL) + pmgntframe = alloc_mgtxmitframe23a(pxmitpriv); + if (!pmgntframe) goto exit; /* update attribute */ @@ -2991,7 +2993,8 @@ static void issue_auth(struct rtw_adapter *padapter, struct sta_info *psta, struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info; - if ((pmgntframe = alloc_mgtxmitframe23a(pxmitpriv)) == NULL) + pmgntframe = alloc_mgtxmitframe23a(pxmitpriv); + if (!pmgntframe) return; /* update attribute */ @@ -3569,7 +3572,8 @@ static int _issue_nulldata23a(struct rtw_adapter *padapter, unsigned char *da, pmlmeext = &padapter->mlmeextpriv; pmlmeinfo = &pmlmeext->mlmext_info; - if ((pmgntframe = alloc_mgtxmitframe23a(pxmitpriv)) == NULL) + pmgntframe = alloc_mgtxmitframe23a(pxmitpriv); + if (!pmgntframe) goto exit; /* update attribute */ @@ -3685,7 +3689,8 @@ static int _issue_qos_nulldata23a(struct rtw_adapter *padapter, DBG_8723A("%s\n", __func__); - if ((pmgntframe = alloc_mgtxmitframe23a(pxmitpriv)) == NULL) + pmgntframe = alloc_mgtxmitframe23a(pxmitpriv); + if (!pmgntframe) goto exit; /* update attribute */ @@ -3810,7 +3815,8 @@ static int _issue_deauth(struct rtw_adapter *padapter, unsigned char *da, /* DBG_8723A("%s to "MAC_FMT"\n", __func__, MAC_ARG(da)); */ - if ((pmgntframe = alloc_mgtxmitframe23a(pxmitpriv)) == NULL) + pmgntframe = alloc_mgtxmitframe23a(pxmitpriv); + if (!pmgntframe) goto exit; /* update attribute */ @@ -3921,7 +3927,8 @@ void issue_action_spct_ch_switch23a(struct rtw_adapter *padapter, DBG_8723A("%s(%s): ra ="MAC_FMT", ch:%u, offset:%u\n", __func__, padapter->pnetdev->name, MAC_ARG(ra), new_ch, ch_offset); - if ((pmgntframe = alloc_mgtxmitframe23a(pxmitpriv)) == NULL) + pmgntframe = alloc_mgtxmitframe23a(pxmitpriv); + if (!pmgntframe) return; /* update attribute */ @@ -3990,7 +3997,8 @@ void issue_action_BA23a(struct rtw_adapter *padapter, DBG_8723A("%s, category =%d, action =%d, status =%d\n", __func__, category, action, status); - if ((pmgntframe = alloc_mgtxmitframe23a(pxmitpriv)) == NULL) + pmgntframe = alloc_mgtxmitframe23a(pxmitpriv); + if (!pmgntframe) return; /* update attribute */ -- 1.9.3 _______________________________________________ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel