Browse Source

qcacmn: clang: Remove unnecessary NULL check for address of array

Clang generated the following warning in various places:

warning: address of array 'weight->pcl_list' will always evaluate
to 'true' [-Wpointer-bool-conversion]
        if (weight->pcl_list) {
              ~~ ~~~^~~

Remove the unnecessary NULL check for address of array.

Change-Id: Ibc82b4d7135a0425748c0fb7f065435ccd28ad6f
CRs-Fixed: 2150493
Srinivas Girigowda 7 years ago
parent
commit
0a297e1b14
1 changed files with 0 additions and 15 deletions
  1. 0 15
      umac/cmn_services/policy_mgr/src/wlan_policy_mgr_pcl.c

+ 0 - 15
umac/cmn_services/policy_mgr/src/wlan_policy_mgr_pcl.c

@@ -1627,21 +1627,6 @@ QDF_STATUS policy_mgr_get_valid_chan_weights(struct wlan_objmgr_psoc *psoc,
 		return QDF_STATUS_E_FAILURE;
 	}
 
-	if (!weight->pcl_list) {
-		policy_mgr_err("Invalid pcl");
-		return QDF_STATUS_E_FAILURE;
-	}
-
-	if (!weight->saved_chan_list) {
-		policy_mgr_err("Invalid valid channel list");
-		return QDF_STATUS_E_FAILURE;
-	}
-
-	if (!weight->weighed_valid_list) {
-		policy_mgr_err("Invalid weighed valid channel list");
-		return QDF_STATUS_E_FAILURE;
-	}
-
 	qdf_mem_set(weight->weighed_valid_list, QDF_MAX_NUM_CHAN,
 		    WEIGHT_OF_DISALLOWED_CHANNELS);
 	qdf_mutex_acquire(&pm_ctx->qdf_conc_list_lock);