Casting value returned by kzalloc is useless. Signed-off-by: Sachin Kamat <sachin.kamat@xxxxxxxxxx> --- drivers/staging/rtl8723au/core/rtw_mlme_ext.c | 27 +++++++++---------------- 1 file changed, 10 insertions(+), 17 deletions(-) diff --git a/drivers/staging/rtl8723au/core/rtw_mlme_ext.c b/drivers/staging/rtl8723au/core/rtw_mlme_ext.c index e1b28a234259..9df54ee95c7c 100644 --- a/drivers/staging/rtl8723au/core/rtw_mlme_ext.c +++ b/drivers/staging/rtl8723au/core/rtw_mlme_ext.c @@ -5084,8 +5084,7 @@ void report_survey_event23a(struct rtw_adapter *padapter, struct recv_frame *pre pmlmeext = &padapter->mlmeextpriv; pcmdpriv = &padapter->cmdpriv; - pcmd_obj = (struct cmd_obj *)kzalloc(sizeof(struct cmd_obj), - GFP_ATOMIC); + pcmd_obj = kzalloc(sizeof(struct cmd_obj), GFP_ATOMIC); if (!pcmd_obj) return; @@ -5135,8 +5134,7 @@ void report_surveydone_event23a(struct rtw_adapter *padapter) struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; struct cmd_priv *pcmdpriv = &padapter->cmdpriv; - pcmd_obj = (struct cmd_obj *)kzalloc(sizeof(struct cmd_obj), - GFP_ATOMIC); + pcmd_obj = kzalloc(sizeof(struct cmd_obj), GFP_ATOMIC); if (!pcmd_obj) return; @@ -5180,8 +5178,7 @@ void report_join_res23a(struct rtw_adapter *padapter, int res) struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info; struct cmd_priv *pcmdpriv = &padapter->cmdpriv; - pcmd_obj = (struct cmd_obj *)kzalloc(sizeof(struct cmd_obj), - GFP_ATOMIC); + pcmd_obj = kzalloc(sizeof(struct cmd_obj), GFP_ATOMIC); if (!pcmd_obj) return; @@ -5230,8 +5227,7 @@ void report_del_sta_event23a(struct rtw_adapter *padapter, unsigned char* MacAdd struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; struct cmd_priv *pcmdpriv = &padapter->cmdpriv; - pcmd_obj = (struct cmd_obj *)kzalloc(sizeof(struct cmd_obj), - GFP_ATOMIC); + pcmd_obj = kzalloc(sizeof(struct cmd_obj), GFP_ATOMIC); if (!pcmd_obj) return; @@ -5284,8 +5280,7 @@ void report_add_sta_event23a(struct rtw_adapter *padapter, unsigned char* MacAdd struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; struct cmd_priv *pcmdpriv = &padapter->cmdpriv; - pcmd_obj = (struct cmd_obj *)kzalloc(sizeof(struct cmd_obj), - GFP_ATOMIC); + pcmd_obj = kzalloc(sizeof(struct cmd_obj), GFP_ATOMIC); if (!pcmd_obj) return; @@ -5699,13 +5694,12 @@ static void survey_timer_hdl(unsigned long data) pmlmeext->scan_abort = false;/* reset */ } - ph2c = (struct cmd_obj *)kzalloc(sizeof(struct cmd_obj), - GFP_ATOMIC); + ph2c = kzalloc(sizeof(struct cmd_obj), GFP_ATOMIC); if (!ph2c) goto exit_survey_timer_hdl; - psurveyPara = (struct sitesurvey_parm*) - kzalloc(sizeof(struct sitesurvey_parm), GFP_ATOMIC); + psurveyPara = kzalloc(sizeof(struct sitesurvey_parm), + GFP_ATOMIC); if (!psurveyPara) { kfree(ph2c); goto exit_survey_timer_hdl; @@ -6377,14 +6371,13 @@ int set_tx_beacon_cmd23a(struct rtw_adapter* padapter) u8 res = _SUCCESS; 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) { res = _FAIL; goto exit; } - ptxBeacon_parm = (struct Tx_Beacon_param *) - kzalloc(sizeof(struct Tx_Beacon_param), GFP_ATOMIC); + ptxBeacon_parm = kzalloc(sizeof(struct Tx_Beacon_param), GFP_ATOMIC); if (!ptxBeacon_parm) { kfree(ph2c); res = _FAIL; -- 1.7.9.5 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel