uiSectBoundary = uiSectAlignAddr + Adapter->uiSectorSize;
pTempBuff = kmalloc(Adapter->uiSectorSize, GFP_KERNEL);
- if (NULL == pTempBuff)
+ if (!pTempBuff)
goto BeceemFlashBulkWrite_EXIT;
/*
* check if the data to be written is overlapped across sectors
uiSectBoundary = uiSectAlignAddr + Adapter->uiSectorSize;
pTempBuff = kmalloc(Adapter->uiSectorSize, GFP_KERNEL);
- if (NULL == pTempBuff)
+ if (!pTempBuff)
goto BeceemFlashBulkWriteStatus_EXIT;
/*
unsigned int value;
int Status = 0;
- if (pBuff == NULL)
+ if (!pBuff)
return -ENOMEM;
if (0 != BeceemEEPROMBulkRead(Adapter, &uiEepromSize, EEPROM_SIZE_OFFSET, 4)) {
int BcmAllocFlashCSStructure(struct bcm_mini_adapter *psAdapter)
{
- if (psAdapter == NULL) {
+ if (!psAdapter) {
BCM_DEBUG_PRINT(psAdapter, DBG_TYPE_PRINTK, 0, 0, "Adapter structure point is NULL");
return -EINVAL;
}
}
psAdapter->psFlash2xCSInfo = (PFLASH2X_CS_INFO)kzalloc(sizeof(FLASH2X_CS_INFO), GFP_KERNEL);
- if (psAdapter->psFlash2xCSInfo == NULL) {
+ if (!psAdapter->psFlash2xCSInfo) {
BCM_DEBUG_PRINT(psAdapter, DBG_TYPE_PRINTK, 0, 0, "Can't Allocate memory for Flash 2.x");
kfree(psAdapter->psFlashCSInfo);
return -ENOMEM;
}
psAdapter->psFlash2xVendorInfo = (PFLASH2X_VENDORSPECIFIC_INFO)kzalloc(sizeof(FLASH2X_VENDORSPECIFIC_INFO), GFP_KERNEL);
- if (psAdapter->psFlash2xVendorInfo == NULL) {
+ if (!psAdapter->psFlash2xVendorInfo) {
BCM_DEBUG_PRINT(psAdapter, DBG_TYPE_PRINTK, 0, 0, "Can't Allocate Vendor Info Memory for Flash 2.x");
kfree(psAdapter->psFlashCSInfo);
kfree(psAdapter->psFlash2xCSInfo);
int BcmDeAllocFlashCSStructure(struct bcm_mini_adapter *psAdapter)
{
- if (psAdapter == NULL) {
+ if (!psAdapter) {
BCM_DEBUG_PRINT(psAdapter, DBG_TYPE_PRINTK, 0, 0, "Adapter structure point is NULL");
return -EINVAL;
}
unsigned int uiAbsoluteOffset = 0;
unsigned int uiTemp = 0, value = 0;
- if (Adapter == NULL) {
+ if (!Adapter) {
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "Adapter structure is NULL");
return -EINVAL;
}
unsigned int FlashSectValStartOffset = 0;
unsigned int uiTemp = 0, value = 0;
- if (Adapter == NULL) {
+ if (!Adapter) {
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "Adapter structure is NULL");
return -EINVAL;
}
Buff = kzalloc(Adapter->uiSectorSize, GFP_KERNEL);
- if (Buff == NULL) {
+ if (!Buff) {
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "Memory allocation failed for section size");
return -ENOMEM;
}
BuffSize = numOfBytes;
pBuff = (PCHAR)kzalloc(BuffSize, GFP_KERNEL);
- if (pBuff == NULL) {
+ if (!pBuff) {
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "Memory allocation failed.. ");
return -ENOMEM;
}
/* If Header is present overwrite passed buffer with this */
if (bHasHeader && (Adapter->bHeaderChangeAllowed == FALSE)) {
pTempBuff = (PUCHAR)kzalloc(HeaderSizeToProtect, GFP_KERNEL);
- if (pTempBuff == NULL) {
+ if (!pTempBuff) {
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "Memory allocation failed");
return -ENOMEM;
}
}
pBuff = (PUCHAR)kzalloc(MAX_RW_SIZE, GFP_KERNEL);
- if (pBuff == NULL) {
+ if (!pBuff) {
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "Can't allocate memorey");
return -ENOMEM;
}
}
pBuff = (PUCHAR)kzalloc(MAX_RW_SIZE, GFP_KERNEL);
- if (pBuff == NULL) {
+ if (!pBuff) {
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "Can't allocate memorey");
return -ENOMEM;
}