Commit 248c9591 authored by Sachin Kamat's avatar Sachin Kamat Committed by Greg Kroah-Hartman

staging: rtl8723au: Remove redundant casting in rtw_mlme_ext.c

Casting value returned by kzalloc is useless.
Signed-off-by: default avatarSachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a06a24d2
...@@ -4873,8 +4873,7 @@ void report_survey_event23a(struct rtw_adapter *padapter, ...@@ -4873,8 +4873,7 @@ void report_survey_event23a(struct rtw_adapter *padapter,
pmlmeext = &padapter->mlmeextpriv; pmlmeext = &padapter->mlmeextpriv;
pcmdpriv = &padapter->cmdpriv; pcmdpriv = &padapter->cmdpriv;
pcmd_obj = (struct cmd_obj *)kzalloc(sizeof(struct cmd_obj), pcmd_obj = kzalloc(sizeof(struct cmd_obj), GFP_ATOMIC);
GFP_ATOMIC);
if (!pcmd_obj) if (!pcmd_obj)
return; return;
...@@ -4925,8 +4924,7 @@ void report_surveydone_event23a(struct rtw_adapter *padapter) ...@@ -4925,8 +4924,7 @@ void report_surveydone_event23a(struct rtw_adapter *padapter)
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
struct cmd_priv *pcmdpriv = &padapter->cmdpriv; struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
pcmd_obj = (struct cmd_obj *)kzalloc(sizeof(struct cmd_obj), pcmd_obj = kzalloc(sizeof(struct cmd_obj), GFP_ATOMIC);
GFP_ATOMIC);
if (!pcmd_obj) if (!pcmd_obj)
return; return;
...@@ -4970,8 +4968,7 @@ void report_join_res23a(struct rtw_adapter *padapter, int res) ...@@ -4970,8 +4968,7 @@ void report_join_res23a(struct rtw_adapter *padapter, int res)
struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info; struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info;
struct cmd_priv *pcmdpriv = &padapter->cmdpriv; struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
pcmd_obj = (struct cmd_obj *)kzalloc(sizeof(struct cmd_obj), pcmd_obj = kzalloc(sizeof(struct cmd_obj), GFP_ATOMIC);
GFP_ATOMIC);
if (!pcmd_obj) if (!pcmd_obj)
return; return;
...@@ -5021,8 +5018,7 @@ void report_del_sta_event23a(struct rtw_adapter *padapter, ...@@ -5021,8 +5018,7 @@ void report_del_sta_event23a(struct rtw_adapter *padapter,
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
struct cmd_priv *pcmdpriv = &padapter->cmdpriv; struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
pcmd_obj = (struct cmd_obj *)kzalloc(sizeof(struct cmd_obj), pcmd_obj = kzalloc(sizeof(struct cmd_obj), GFP_ATOMIC);
GFP_ATOMIC);
if (!pcmd_obj) if (!pcmd_obj)
return; return;
...@@ -5076,8 +5072,7 @@ void report_add_sta_event23a(struct rtw_adapter *padapter, ...@@ -5076,8 +5072,7 @@ void report_add_sta_event23a(struct rtw_adapter *padapter,
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
struct cmd_priv *pcmdpriv = &padapter->cmdpriv; struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
pcmd_obj = (struct cmd_obj *)kzalloc(sizeof(struct cmd_obj), pcmd_obj = kzalloc(sizeof(struct cmd_obj), GFP_ATOMIC);
GFP_ATOMIC);
if (!pcmd_obj) if (!pcmd_obj)
return; return;
...@@ -5493,13 +5488,12 @@ static void survey_timer_hdl(unsigned long data) ...@@ -5493,13 +5488,12 @@ static void survey_timer_hdl(unsigned long data)
pmlmeext->scan_abort = false;/* reset */ pmlmeext->scan_abort = false;/* reset */
} }
ph2c = (struct cmd_obj *)kzalloc(sizeof(struct cmd_obj), ph2c = kzalloc(sizeof(struct cmd_obj), GFP_ATOMIC);
GFP_ATOMIC);
if (!ph2c) if (!ph2c)
goto exit_survey_timer_hdl; goto exit_survey_timer_hdl;
psurveyPara = (struct sitesurvey_parm*) psurveyPara = kzalloc(sizeof(struct sitesurvey_parm),
kzalloc(sizeof(struct sitesurvey_parm), GFP_ATOMIC); GFP_ATOMIC);
if (!psurveyPara) { if (!psurveyPara) {
kfree(ph2c); kfree(ph2c);
goto exit_survey_timer_hdl; goto exit_survey_timer_hdl;
...@@ -6173,14 +6167,13 @@ int set_tx_beacon_cmd23a(struct rtw_adapter* padapter) ...@@ -6173,14 +6167,13 @@ int set_tx_beacon_cmd23a(struct rtw_adapter* padapter)
u8 res = _SUCCESS; u8 res = _SUCCESS;
int len_diff = 0; int len_diff = 0;
ph2c = (struct cmd_obj *)kzalloc(sizeof(struct cmd_obj), GFP_ATOMIC); ph2c = kzalloc(sizeof(struct cmd_obj), GFP_ATOMIC);
if (!ph2c) { if (!ph2c) {
res = _FAIL; res = _FAIL;
goto exit; goto exit;
} }
ptxBeacon_parm = (struct Tx_Beacon_param *) ptxBeacon_parm = kzalloc(sizeof(struct Tx_Beacon_param), GFP_ATOMIC);
kzalloc(sizeof(struct Tx_Beacon_param), GFP_ATOMIC);
if (!ptxBeacon_parm) { if (!ptxBeacon_parm) {
kfree(ph2c); kfree(ph2c);
res = _FAIL; res = _FAIL;
......
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