PRINT_INFO(HOSTAPD_DBG, "In monitor interface receive function\n");
- if (wilc_wfi_mon == NULL)
+ if (!wilc_wfi_mon)
return;
if (!netif_running(wilc_wfi_mon)) {
/* hostapd callback mgmt frame */
skb = dev_alloc_skb(size + sizeof(struct wilc_wfi_radiotap_cb_hdr));
- if (skb == NULL) {
+ if (!skb) {
PRINT_INFO(HOSTAPD_DBG, "Monitor if : No memory to allocate skb");
return;
}
} else {
skb = dev_alloc_skb(size + sizeof(struct wilc_wfi_radiotap_hdr));
- if (skb == NULL) {
+ if (!skb) {
PRINT_INFO(HOSTAPD_DBG, "Monitor if : No memory to allocate skb");
return;
}
{
struct tx_complete_mon_data *mgmt_tx = NULL;
- if (dev == NULL) {
+ if (!dev) {
PRINT_D(HOSTAPD_DBG, "ERROR: dev == NULL\n");
return -EFAULT;
}
netif_stop_queue(dev);
mgmt_tx = kmalloc(sizeof(struct tx_complete_mon_data), GFP_ATOMIC);
- if (mgmt_tx == NULL) {
+ if (!mgmt_tx) {
PRINT_ER("Failed to allocate memory for mgmt_tx structure\n");
return -EFAULT;
}
mgmt_tx->buff = kmalloc(len, GFP_ATOMIC);
- if (mgmt_tx->buff == NULL) {
+ if (!mgmt_tx->buff) {
PRINT_ER("Failed to allocate memory for mgmt_tx buff\n");
kfree(mgmt_tx);
return -EFAULT;
struct sk_buff *skb2;
struct wilc_wfi_radiotap_cb_hdr *cb_hdr;
- if (wilc_wfi_mon == NULL)
+ if (!wilc_wfi_mon)
return -EFAULT;
mon_priv = netdev_priv(wilc_wfi_mon);
- if (mon_priv == NULL) {
+ if (!mon_priv) {
PRINT_ER("Monitor interface private structure is NULL\n");
return -EFAULT;
}
return NULL;
}
priv = netdev_priv(wilc_wfi_mon);
- if (priv == NULL) {
+ if (!priv) {
PRINT_ER("private structure is NULL\n");
return NULL;
}
{
bool rollback_lock = false;
- if (wilc_wfi_mon != NULL) {
+ if (wilc_wfi_mon) {
PRINT_D(HOSTAPD_DBG, "In Deinit monitor interface\n");
PRINT_D(HOSTAPD_DBG, "RTNL is being locked\n");
if (rtnl_is_locked()) {