From a5f9943cc01e10a118c85845d8638b5f1331827e Mon Sep 17 00:00:00 2001 From: Chaehyun Lim Date: Thu, 24 Dec 2015 16:52:35 +0900 Subject: [PATCH] staging: wilc1000: remove wilc_free_join_params wilc_free_join_params call kfree. There is no need to use wrapper function, so use kfree directly. Signed-off-by: Chaehyun Lim Signed-off-by: Greg Kroah-Hartman --- drivers/staging/wilc1000/host_interface.c | 8 -------- drivers/staging/wilc1000/host_interface.h | 3 --- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 6 +++--- 3 files changed, 3 insertions(+), 14 deletions(-) diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index 6e5bccc8bc3d..724b4bd75ac0 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -4609,14 +4609,6 @@ static void *host_int_ParseJoinBssParam(tstrNetworkInfo *ptstrNetworkInfo) return (void *)pNewJoinBssParam; } -void wilc_free_join_params(void *pJoinParams) -{ - if ((struct bss_param *)pJoinParams) - kfree((struct bss_param *)pJoinParams); - else - PRINT_ER("Unable to FREE null pointer\n"); -} - s32 wilc_del_all_rx_ba_session(struct wilc_vif *vif, char *pBSSID, char TID) { s32 result = 0; diff --git a/drivers/staging/wilc1000/host_interface.h b/drivers/staging/wilc1000/host_interface.h index fa5d2925e47a..7ac85f27217e 100644 --- a/drivers/staging/wilc1000/host_interface.h +++ b/drivers/staging/wilc1000/host_interface.h @@ -365,9 +365,6 @@ s32 wilc_listen_state_expired(struct wilc_vif *vif, u32 u32SessionID); s32 wilc_frame_register(struct wilc_vif *vif, u16 u16FrameType, bool bReg); int wilc_set_wfi_drv_handler(struct wilc_vif *vif, int index); int wilc_set_operation_mode(struct wilc_vif *vif, u32 mode); - -void wilc_free_join_params(void *pJoinParams); - s32 wilc_get_statistics(struct wilc_vif *vif, struct rf_info *pstrStatistics); void wilc_resolve_disconnect_aberration(struct wilc_vif *vif); int wilc_get_vif_idx(struct wilc_vif *vif); diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c index 53fb2d4bb0bd..be5704bfc382 100644 --- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c @@ -196,7 +196,7 @@ static void clear_shadow_scan(void) last_scanned_shadow[last_scanned_cnt].pu8IEs = NULL; } - wilc_free_join_params(last_scanned_shadow[i].pJoinParams); + kfree(last_scanned_shadow[i].pJoinParams); last_scanned_shadow[i].pJoinParams = NULL; } last_scanned_cnt = 0; @@ -282,7 +282,7 @@ static void remove_network_from_shadow(unsigned long arg) kfree(last_scanned_shadow[i].pu8IEs); last_scanned_shadow[i].pu8IEs = NULL; - wilc_free_join_params(last_scanned_shadow[i].pJoinParams); + kfree(last_scanned_shadow[i].pJoinParams); for (j = i; (j < last_scanned_cnt - 1); j++) last_scanned_shadow[j] = last_scanned_shadow[j + 1]; @@ -376,7 +376,7 @@ static void add_network_to_shadow(tstrNetworkInfo *pstrNetworkInfo, last_scanned_shadow[ap_index].u32TimeRcvdInScanCached = jiffies; last_scanned_shadow[ap_index].u8Found = 1; if (ap_found != -1) - wilc_free_join_params(last_scanned_shadow[ap_index].pJoinParams); + kfree(last_scanned_shadow[ap_index].pJoinParams); last_scanned_shadow[ap_index].pJoinParams = pJoinParams; } -- 2.20.1