From efbeeab4fc24a4c3ab5a552b5f9e99925bdf49ed Mon Sep 17 00:00:00 2001 From: Srinivas Girigowda Date: Tue, 28 Nov 2017 18:12:22 -0800 Subject: [PATCH] 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 --- src/wlan_policy_mgr_pcl.c | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/src/wlan_policy_mgr_pcl.c b/src/wlan_policy_mgr_pcl.c index 3728d2a3adcb..11a4b32598e5 100644 --- a/src/wlan_policy_mgr_pcl.c +++ b/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);