pcmdpriv->cmd_seq = 1;
pcmdpriv->cmd_allocated_buf = kmalloc(MAX_CMDSZ + CMDBUFF_ALIGN_SZ,
GFP_ATOMIC);
- if (pcmdpriv->cmd_allocated_buf == NULL)
+ if (!pcmdpriv->cmd_allocated_buf)
return _FAIL;
pcmdpriv->cmd_buf = pcmdpriv->cmd_allocated_buf + CMDBUFF_ALIGN_SZ -
((addr_t)(pcmdpriv->cmd_allocated_buf) &
(CMDBUFF_ALIGN_SZ - 1));
pcmdpriv->rsp_allocated_buf = kmalloc(MAX_RSPSZ + 4, GFP_ATOMIC);
- if (pcmdpriv->rsp_allocated_buf == NULL)
+ if (!pcmdpriv->rsp_allocated_buf)
return _FAIL;
pcmdpriv->rsp_buf = pcmdpriv->rsp_allocated_buf + 4 -
((addr_t)(pcmdpriv->rsp_allocated_buf) & 3);
pevtpriv->event_seq = 0;
pevtpriv->evt_allocated_buf = kmalloc(MAX_EVTSZ + 4, GFP_ATOMIC);
- if (pevtpriv->evt_allocated_buf == NULL)
+ if (!pevtpriv->evt_allocated_buf)
return _FAIL;
pevtpriv->evt_buf = pevtpriv->evt_allocated_buf + 4 -
((addr_t)(pevtpriv->evt_allocated_buf) & 3);
{
unsigned long irqL;
- if (obj == NULL)
+ if (!obj)
return _SUCCESS;
spin_lock_irqsave(&queue->lock, irqL);
list_add_tail(&obj->list, &queue->queue);
unsigned long irqL;
struct __queue *queue;
- if (obj == NULL)
+ if (!obj)
return _SUCCESS;
if (pcmdpriv->padapter->eeprompriv.bautoload_fail_flag)
return _FAIL;
}
}
psecnetwork = &psecuritypriv->sec_bss;
- if (psecnetwork == NULL) {
+ if (!psecnetwork) {
kfree(pcmd);
return _FAIL;
}
if (!psta) {
psta = r8712_alloc_stainfo(&padapter->stapriv,
pnetwork->MacAddress);
- if (psta == NULL)
+ if (!psta)
goto createbss_cmd_fail;
}
r8712_indicate_connect(padapter);
} else {
pwlan = _r8712_alloc_network(pmlmepriv);
- if (pwlan == NULL) {
+ if (!pwlan) {
pwlan = r8712_get_oldest_wlan_network(
&pmlmepriv->scanned_queue);
- if (pwlan == NULL)
+ if (!pwlan)
goto createbss_cmd_fail;
pwlan->last_scanned = jiffies;
} else
struct sta_info *psta = r8712_get_stainfo(pstapriv,
psetstakey_rsp->addr);
- if (psta == NULL)
+ if (!psta)
goto exit;
psta->aid = psta->mac_id = psetstakey_rsp->keyid; /*CAM_ID(CAM_ENTRY)*/
exit:
struct sta_info *psta = r8712_get_stainfo(pstapriv,
passocsta_parm->addr);
- if (psta == NULL)
+ if (!psta)
return;
psta->aid = psta->mac_id = passocsta_rsp->cam_id;
spin_lock_irqsave(&pmlmepriv->lock, irqL);