From: Sachin Kamat Date: Thu, 29 May 2014 11:35:18 +0000 (+0530) Subject: staging: rtl8723au: Remove redundant casting in rtw_mlme_ext.c X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=248c95915277edbe632ab171b0b082c2ba1af935;p=openwrt%2Fstaging%2Fblogic.git staging: rtl8723au: Remove redundant casting in rtw_mlme_ext.c Casting value returned by kzalloc is useless. Signed-off-by: Sachin Kamat Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/rtl8723au/core/rtw_mlme_ext.c b/drivers/staging/rtl8723au/core/rtw_mlme_ext.c index 0d5269945323..84ca06b81222 100644 --- a/drivers/staging/rtl8723au/core/rtw_mlme_ext.c +++ b/drivers/staging/rtl8723au/core/rtw_mlme_ext.c @@ -4873,8 +4873,7 @@ void report_survey_event23a(struct rtw_adapter *padapter, 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; @@ -4925,8 +4924,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; @@ -4970,8 +4968,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; @@ -5021,8 +5018,7 @@ void report_del_sta_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; @@ -5076,8 +5072,7 @@ void report_add_sta_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; @@ -5493,13 +5488,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; @@ -6173,14 +6167,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;