Commit d0fc1464 authored by Jes Sorensen's avatar Jes Sorensen Committed by Greg Kroah-Hartman

staging: rtl8723au: rtw_mlme_ext.c: Sanitize calls to alloc_mgtxmitframe23a()

Signed-off-by: default avatarJes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 92825e6e
...@@ -2467,7 +2467,8 @@ void issue_beacon23a(struct rtw_adapter *padapter, int timeout_ms) ...@@ -2467,7 +2467,8 @@ void issue_beacon23a(struct rtw_adapter *padapter, int timeout_ms)
/* DBG_8723A("%s\n", __func__); */ /* 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__); DBG_8723A("%s, alloc mgnt frame fail\n", __func__);
return; return;
} }
...@@ -2843,7 +2844,8 @@ static int _issue_probereq(struct rtw_adapter *padapter, ...@@ -2843,7 +2844,8 @@ static int _issue_probereq(struct rtw_adapter *padapter,
RT_TRACE(_module_rtl871x_mlme_c_, _drv_notice_, RT_TRACE(_module_rtl871x_mlme_c_, _drv_notice_,
("+%s\n", __func__)); ("+%s\n", __func__));
if ((pmgntframe = alloc_mgtxmitframe23a(pxmitpriv)) == NULL) pmgntframe = alloc_mgtxmitframe23a(pxmitpriv);
if (!pmgntframe)
goto exit; goto exit;
/* update attribute */ /* update attribute */
...@@ -2991,7 +2993,8 @@ static void issue_auth(struct rtw_adapter *padapter, struct sta_info *psta, ...@@ -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_priv *pmlmeext = &padapter->mlmeextpriv;
struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info; struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info;
if ((pmgntframe = alloc_mgtxmitframe23a(pxmitpriv)) == NULL) pmgntframe = alloc_mgtxmitframe23a(pxmitpriv);
if (!pmgntframe)
return; return;
/* update attribute */ /* update attribute */
...@@ -3569,7 +3572,8 @@ static int _issue_nulldata23a(struct rtw_adapter *padapter, unsigned char *da, ...@@ -3569,7 +3572,8 @@ static int _issue_nulldata23a(struct rtw_adapter *padapter, unsigned char *da,
pmlmeext = &padapter->mlmeextpriv; pmlmeext = &padapter->mlmeextpriv;
pmlmeinfo = &pmlmeext->mlmext_info; pmlmeinfo = &pmlmeext->mlmext_info;
if ((pmgntframe = alloc_mgtxmitframe23a(pxmitpriv)) == NULL) pmgntframe = alloc_mgtxmitframe23a(pxmitpriv);
if (!pmgntframe)
goto exit; goto exit;
/* update attribute */ /* update attribute */
...@@ -3685,7 +3689,8 @@ static int _issue_qos_nulldata23a(struct rtw_adapter *padapter, ...@@ -3685,7 +3689,8 @@ static int _issue_qos_nulldata23a(struct rtw_adapter *padapter,
DBG_8723A("%s\n", __func__); DBG_8723A("%s\n", __func__);
if ((pmgntframe = alloc_mgtxmitframe23a(pxmitpriv)) == NULL) pmgntframe = alloc_mgtxmitframe23a(pxmitpriv);
if (!pmgntframe)
goto exit; goto exit;
/* update attribute */ /* update attribute */
...@@ -3810,7 +3815,8 @@ static int _issue_deauth(struct rtw_adapter *padapter, unsigned char *da, ...@@ -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)); */ /* 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; goto exit;
/* update attribute */ /* update attribute */
...@@ -3921,7 +3927,8 @@ void issue_action_spct_ch_switch23a(struct rtw_adapter *padapter, ...@@ -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__, DBG_8723A("%s(%s): ra ="MAC_FMT", ch:%u, offset:%u\n", __func__,
padapter->pnetdev->name, MAC_ARG(ra), new_ch, ch_offset); padapter->pnetdev->name, MAC_ARG(ra), new_ch, ch_offset);
if ((pmgntframe = alloc_mgtxmitframe23a(pxmitpriv)) == NULL) pmgntframe = alloc_mgtxmitframe23a(pxmitpriv);
if (!pmgntframe)
return; return;
/* update attribute */ /* update attribute */
...@@ -3990,7 +3997,8 @@ void issue_action_BA23a(struct rtw_adapter *padapter, ...@@ -3990,7 +3997,8 @@ void issue_action_BA23a(struct rtw_adapter *padapter,
DBG_8723A("%s, category =%d, action =%d, status =%d\n", DBG_8723A("%s, category =%d, action =%d, status =%d\n",
__func__, category, action, status); __func__, category, action, status);
if ((pmgntframe = alloc_mgtxmitframe23a(pxmitpriv)) == NULL) pmgntframe = alloc_mgtxmitframe23a(pxmitpriv);
if (!pmgntframe)
return; return;
/* update attribute */ /* update attribute */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment