Эх сурвалжийг харах

qcacmn: Fix the use of uninitialized variable in policy manager

Initialize the uninitialized variable in
policy_mgr_get_channel_from_scan_result().

Change-Id: I435e6021b989562b69b3bccaa9a90d9cfd3ae560
CRs-Fixed: 2091884
Tushnim Bhattacharyya 7 жил өмнө
parent
commit
0b1a7ffdc0

+ 2 - 1
umac/cmn_services/policy_mgr/src/wlan_policy_mgr_get_set_utils.c

@@ -1705,7 +1705,7 @@ QDF_STATUS policy_mgr_get_channel_from_scan_result(
 		struct wlan_objmgr_psoc *psoc,
 		void *roam_profile, uint8_t *channel)
 {
-	QDF_STATUS status;
+	QDF_STATUS status = QDF_STATUS_E_FAILURE;
 	void *scan_cache = NULL;
 	struct policy_mgr_psoc_priv_obj *pm_ctx;
 
@@ -1729,6 +1729,7 @@ QDF_STATUS policy_mgr_get_channel_from_scan_result(
 		}
 	} else {
 		policy_mgr_err("sme_get_ap_channel_from_scan_cache NULL");
+		return QDF_STATUS_E_FAILURE;
 	}
 
 	if (pm_ctx->sme_cbacks.sme_scan_result_purge)