Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b1413b60 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

staging: wilc100: remove WILC_NULL usage



Use the "real" NULL value, don't try to be cute and define your own
value for something that the compiler obviously supports.

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: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 8e1d4e5c
Loading
Loading
Loading
Loading
+11 −11
Original line number Diff line number Diff line
@@ -771,7 +771,7 @@ WILC_Uint8 get_current_channel(WILC_Uint8 *pu8msa, WILC_Uint16 u16RxLen)
WILC_Sint32 ParseNetworkInfo(WILC_Uint8 *pu8MsgBuffer, tstrNetworkInfo **ppstrNetworkInfo)
{
	WILC_Sint32 s32Error = WILC_SUCCESS;
	tstrNetworkInfo *pstrNetworkInfo = WILC_NULL;
	tstrNetworkInfo *pstrNetworkInfo = NULL;
	WILC_Uint8 u8MsgType = 0;
	WILC_Uint8 u8MsgID = 0;
	WILC_Uint16 u16MsgLen = 0;
@@ -894,16 +894,16 @@ WILC_Sint32 DeallocateNetworkInfo(tstrNetworkInfo *pstrNetworkInfo)
{
	WILC_Sint32 s32Error = WILC_SUCCESS;

	if (pstrNetworkInfo != WILC_NULL) {
		if (pstrNetworkInfo->pu8IEs != WILC_NULL) {
	if (pstrNetworkInfo != NULL) {
		if (pstrNetworkInfo->pu8IEs != NULL) {
			WILC_FREE(pstrNetworkInfo->pu8IEs);
			pstrNetworkInfo->pu8IEs = WILC_NULL;
			pstrNetworkInfo->pu8IEs = NULL;
		} else {
			s32Error = WILC_FAIL;
		}

		WILC_FREE(pstrNetworkInfo);
		pstrNetworkInfo = WILC_NULL;
		pstrNetworkInfo = NULL;

	} else {
		s32Error = WILC_FAIL;
@@ -927,7 +927,7 @@ WILC_Sint32 ParseAssocRespInfo(WILC_Uint8 *pu8Buffer, WILC_Uint32 u32BufferLen,
			       tstrConnectRespInfo **ppstrConnectRespInfo)
{
	WILC_Sint32 s32Error = WILC_SUCCESS;
	tstrConnectRespInfo *pstrConnectRespInfo = WILC_NULL;
	tstrConnectRespInfo *pstrConnectRespInfo = NULL;
	WILC_Uint16 u16AssocRespLen = 0;
	WILC_Uint8 *pu8IEs = 0;
	WILC_Uint16 u16IEsLen = 0;
@@ -979,16 +979,16 @@ WILC_Sint32 DeallocateAssocRespInfo(tstrConnectRespInfo *pstrConnectRespInfo)
{
	WILC_Sint32 s32Error = WILC_SUCCESS;

	if (pstrConnectRespInfo != WILC_NULL) {
		if (pstrConnectRespInfo->pu8RespIEs != WILC_NULL) {
	if (pstrConnectRespInfo != NULL) {
		if (pstrConnectRespInfo->pu8RespIEs != NULL) {
			WILC_FREE(pstrConnectRespInfo->pu8RespIEs);
			pstrConnectRespInfo->pu8RespIEs = WILC_NULL;
			pstrConnectRespInfo->pu8RespIEs = NULL;
		} else {
			s32Error = WILC_FAIL;
		}

		WILC_FREE(pstrConnectRespInfo);
		pstrConnectRespInfo = WILC_NULL;
		pstrConnectRespInfo = NULL;

	} else {
		s32Error = WILC_FAIL;
@@ -1060,7 +1060,7 @@ WILC_Sint32 DeallocateSurveyResults(wid_site_survey_reslts_s *pstrSurveyResults)
{
	WILC_Sint32 s32Error = WILC_SUCCESS;

	if (pstrSurveyResults != WILC_NULL) {
	if (pstrSurveyResults != NULL) {
		WILC_FREE(pstrSurveyResults);
	}

+149 −149

File changed.

Preview size limit exceeded, changes collapsed.

+1 −1
Original line number Diff line number Diff line
@@ -304,7 +304,7 @@ static int dev_state_ev_handler(struct notifier_block *this, unsigned long event
		if (nic->iftype == STATION_MODE || nic->iftype == CLIENT_MODE) {
			pstrWFIDrv->IFC_UP = 1;
			g_obtainingIP = WILC_FALSE;
			WILC_TimerStop(&hDuringIpTimer, WILC_NULL);
			WILC_TimerStop(&hDuringIpTimer, NULL);
			PRINT_D(GENERIC_DBG, "IP obtained , enable scan\n");
		}

+1 −1
Original line number Diff line number Diff line
@@ -55,7 +55,7 @@ typedef WILC_Sint32 WILC_ErrNo;
} while (0)

#define  WILC_NULLCHECK(__status__, __ptr__)	do { \
		if (__ptr__ == WILC_NULL) { \
		if (__ptr__ == NULL) { \
			WILC_ERRORREPORT(__status__, WILC_NULL_PTR); \
		} \
} while (0)
+3 −3
Original line number Diff line number Diff line
@@ -12,7 +12,7 @@ void *WILC_MemoryAlloc(WILC_Uint32 u32Size, tstrWILC_MemoryAttrs *strAttrs,
	if (u32Size > 0) {
		return kmalloc(u32Size, GFP_ATOMIC);
	} else {
		return WILC_NULL;
		return NULL;
	}
}

@@ -37,8 +37,8 @@ void *WILC_MemoryRealloc(void *pvOldBlock, WILC_Uint32 u32NewSize,
{
	if (u32NewSize == 0) {
		kfree(pvOldBlock);
		return WILC_NULL;
	} else if (pvOldBlock == WILC_NULL)	 {
		return NULL;
	} else if (pvOldBlock == NULL)	 {
		return kmalloc(u32NewSize, GFP_KERNEL);
	} else {
		return krealloc(pvOldBlock, u32NewSize, GFP_KERNEL);
Loading