down(&(priv->hSemScanReq));
 
-                       if (priv->pstrScanReq != NULL) {
+                       if (priv->pstrScanReq) {
                                cfg80211_scan_done(priv->pstrScanReq, false);
                                priv->u32RcvdChCount = 0;
                                priv->bCfgScanning = false;
                        down(&(priv->hSemScanReq));
 
                        PRINT_D(CFG80211_DBG, "Scan Aborted\n");
-                       if (priv->pstrScanReq != NULL) {
+                       if (priv->pstrScanReq) {
                                update_scan_time();
                                refresh_scan(priv, 1, false);
 
 
 
                        for (i = 0; i < request->n_ssids; i++) {
-                               if (request->ssids[i].ssid != NULL && request->ssids[i].ssid_len != 0) {
+                               if (request->ssids[i].ssid &&
+                                   request->ssids[i].ssid_len != 0) {
                                        strHiddenNetwork.pstrHiddenNetworkInfo[i].pu8ssid = kmalloc(request->ssids[i].ssid_len, GFP_KERNEL);
                                        memcpy(strHiddenNetwork.pstrHiddenNetworkInfo[i].pu8ssid, request->ssids[i].ssid, request->ssids[i].ssid_len);
                                        strHiddenNetwork.pstrHiddenNetworkInfo[i].u8ssidlen = request->ssids[i].ssid_len;
                           sme->ssid,
                           sme->ssid_len) == 0) {
                        PRINT_INFO(CFG80211_DBG, "Network with required SSID is found %s\n", sme->ssid);
-                       if (sme->bssid == NULL) {
+                       if (!sme->bssid) {
                                PRINT_INFO(CFG80211_DBG, "BSSID is not passed from the user\n");
                                break;
                        } else {
        case WLAN_CIPHER_SUITE_TKIP:
        case WLAN_CIPHER_SUITE_CCMP:
                if (priv->wdev->iftype == NL80211_IFTYPE_AP || priv->wdev->iftype == NL80211_IFTYPE_P2P_GO) {
-                       if (priv->wilc_gtk[key_index] == NULL) {
+                       if (!priv->wilc_gtk[key_index]) {
                                priv->wilc_gtk[key_index] = kmalloc(sizeof(struct wilc_wfi_key), GFP_KERNEL);
                                priv->wilc_gtk[key_index]->key = NULL;
                                priv->wilc_gtk[key_index]->seq = NULL;
                        }
-                       if (priv->wilc_ptk[key_index] == NULL) {
+                       if (!priv->wilc_ptk[key_index]) {
                                priv->wilc_ptk[key_index] = kmalloc(sizeof(struct wilc_wfi_key), GFP_KERNEL);
                                priv->wilc_ptk[key_index]->key = NULL;
                                priv->wilc_ptk[key_index]->seq = NULL;
 
        if (ieee80211_is_mgmt(mgmt->frame_control)) {
                mgmt_tx = kmalloc(sizeof(struct p2p_mgmt_data), GFP_KERNEL);
-               if (mgmt_tx == NULL) {
+               if (!mgmt_tx) {
                        PRINT_ER("Failed to allocate memory for mgmt_tx structure\n");
                        return -EFAULT;
                }
                mgmt_tx->buff = kmalloc(buf_len, GFP_KERNEL);
-               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;
 
        PRINT_D(CFG80211_DBG, " Power save Enabled= %d , TimeOut = %d\n", enabled, timeout);
 
-       if (wiphy == NULL)
+       if (!wiphy)
                return -ENOENT;
 
        priv = wiphy_priv(wiphy);
-       if (priv->hWILCWFIDrv == NULL) {
+       if (!priv->hWILCWFIDrv) {
                PRINT_ER("Driver is NULL\n");
                return -EIO;
        }
                PRINT_D(HOSTAPD_DBG, "Number of supported rates = %d\n",
                        strStaParams.rates_len);
 
-               if (params->ht_capa == NULL) {
+               if (!params->ht_capa) {
                        strStaParams.ht_supported = false;
                } else {
                        strStaParams.ht_supported = true;
                PRINT_D(HOSTAPD_DBG, "Deleting station\n");
 
 
-               if (mac == NULL) {
+               if (!mac) {
                        PRINT_D(HOSTAPD_DBG, "All associated stations\n");
                        s32Error = wilc_del_allstation(priv->hWILCWFIDrv, priv->assoc_stainfo.au8Sta_AssociatedBss);
                } else {
                PRINT_D(HOSTAPD_DBG, "Number of supported rates = %d\n",
                        strStaParams.rates_len);
 
-               if (params->ht_capa == NULL) {
+               if (!params->ht_capa) {
                        strStaParams.ht_supported = false;
                } else {
                        strStaParams.ht_supported = true;
                PRINT_D(HOSTAPD_DBG, "Monitor interface mode: Initializing mon interface virtual device driver\n");
                PRINT_D(HOSTAPD_DBG, "Adding monitor interface[%p]\n", nic->wilc_netdev);
                new_ifc = WILC_WFI_init_mon_interface(name, nic->wilc_netdev);
-               if (new_ifc != NULL) {
+               if (new_ifc) {
                        PRINT_D(HOSTAPD_DBG, "Setting monitor flag in private structure\n");
                        nic = netdev_priv(priv->wdev->netdev);
                        nic->monitor_flag = 1;
        PRINT_D(CFG80211_DBG, "Registering wifi device\n");
 
        wdev = WILC_WFI_CfgAlloc();
-       if (wdev == NULL) {
+       if (!wdev) {
                PRINT_ER("CfgAlloc Failed\n");
                return NULL;
        }