mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-13 17:28:56 +00:00
staging: wilc1000: remove WILC_FREE_IF_TRUE macro
Just use kfree, as that's all it resolves itself to. Cc: Johnny Kim <johnny.kim@atmel.com> Cc: Rachel Kim <rachel.kim@atmel.com> Cc: Dean Lee <dean.lee@atmel.com> Cc: Chris Park <chris.park@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
cc6c16df80
commit
969effe9dc
@ -3487,9 +3487,9 @@ static void Handle_AddBeacon(tstrWILC_WFIDrv *drvHandler, tstrHostIFSetBeacon *p
|
||||
WILC_CATCH(s32Error)
|
||||
{
|
||||
}
|
||||
WILC_FREE_IF_TRUE(strWID.ps8WidVal);
|
||||
WILC_FREE_IF_TRUE(pstrSetBeaconParam->pu8Head);
|
||||
WILC_FREE_IF_TRUE(pstrSetBeaconParam->pu8Tail);
|
||||
kfree(strWID.ps8WidVal);
|
||||
kfree(pstrSetBeaconParam->pu8Head);
|
||||
kfree(pstrSetBeaconParam->pu8Tail);
|
||||
}
|
||||
|
||||
|
||||
@ -3629,8 +3629,8 @@ static void Handle_AddStation(tstrWILC_WFIDrv *drvHandler, tstrWILC_AddStaParam
|
||||
WILC_CATCH(s32Error)
|
||||
{
|
||||
}
|
||||
WILC_FREE_IF_TRUE(pstrStationParam->pu8Rates);
|
||||
WILC_FREE_IF_TRUE(strWID.ps8WidVal);
|
||||
kfree(pstrStationParam->pu8Rates);
|
||||
kfree(strWID.ps8WidVal);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -3686,7 +3686,7 @@ static void Handle_DelAllSta(tstrWILC_WFIDrv *drvHandler, tstrHostIFDelAllSta *p
|
||||
WILC_CATCH(s32Error)
|
||||
{
|
||||
}
|
||||
WILC_FREE_IF_TRUE(strWID.ps8WidVal);
|
||||
kfree(strWID.ps8WidVal);
|
||||
|
||||
up(&hWaitResponse);
|
||||
}
|
||||
@ -3733,7 +3733,7 @@ static void Handle_DelStation(tstrWILC_WFIDrv *drvHandler, tstrHostIFDelSta *pst
|
||||
WILC_CATCH(s32Error)
|
||||
{
|
||||
}
|
||||
WILC_FREE_IF_TRUE(strWID.ps8WidVal);
|
||||
kfree(strWID.ps8WidVal);
|
||||
}
|
||||
|
||||
|
||||
@ -3776,8 +3776,8 @@ static void Handle_EditStation(tstrWILC_WFIDrv *drvHandler, tstrWILC_AddStaParam
|
||||
WILC_CATCH(s32Error)
|
||||
{
|
||||
}
|
||||
WILC_FREE_IF_TRUE(pstrStationParam->pu8Rates);
|
||||
WILC_FREE_IF_TRUE(strWID.ps8WidVal);
|
||||
kfree(pstrStationParam->pu8Rates);
|
||||
kfree(strWID.ps8WidVal);
|
||||
}
|
||||
#endif /*WILC_AP_EXTERNAL_MLME*/
|
||||
|
||||
@ -4093,7 +4093,7 @@ static void Handle_SetMulticastFilter(tstrWILC_WFIDrv *drvHandler, tstrHostIFSet
|
||||
WILC_CATCH(s32Error)
|
||||
{
|
||||
}
|
||||
WILC_FREE_IF_TRUE(strWID.ps8WidVal);
|
||||
kfree(strWID.ps8WidVal);
|
||||
|
||||
}
|
||||
|
||||
|
@ -61,7 +61,6 @@ void *WILC_MemoryAlloc(u32 u32Size, tstrWILC_MemoryAttrs *strAttrs,
|
||||
* @sa WILC_FREE
|
||||
* @sa WILC_FREE_EX
|
||||
* @sa WILC_FREE_SET_NULL
|
||||
* @sa WILC_FREE_IF_TRUE
|
||||
* @author syounan
|
||||
* @date 16 Aug 2010
|
||||
* @version 1.0
|
||||
@ -92,18 +91,6 @@ void WILC_MemoryFree(const void *pvBlock, tstrWILC_MemoryAttrs *strAttrs,
|
||||
((__struct_type__ *)WILC_MALLOC_EX( \
|
||||
sizeof(__struct_type__) * (u32)(__n_structs__), __attrs__))
|
||||
|
||||
|
||||
|
||||
/*!
|
||||
* @brief Frees a block (with custom attributes) if the pointer expression evaluates
|
||||
* to true
|
||||
*/
|
||||
#define WILC_FREE_IF_TRUE_EX(__ptr__, __attrs__) do { \
|
||||
if (__ptr__ != NULL) { \
|
||||
WILC_FREE_EX(__ptr__, __attrs__); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
/*!
|
||||
* @brief standrad malloc wrapper with default attributes
|
||||
*/
|
||||
@ -120,14 +107,4 @@ void WILC_MemoryFree(const void *pvBlock, tstrWILC_MemoryAttrs *strAttrs,
|
||||
#define WILC_NEW(__struct_type__, __n_structs__) \
|
||||
WILC_NEW_EX(__struct_type__, __n_structs__, NULL)
|
||||
|
||||
|
||||
|
||||
/*!
|
||||
* @brief Frees a block (with default attributes) if the pointer expression evaluates
|
||||
* to true
|
||||
*/
|
||||
#define WILC_FREE_IF_TRUE(__ptr__) \
|
||||
WILC_FREE_IF_TRUE_EX(__ptr__, NULL)
|
||||
|
||||
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user