From 0b1a7ffdc029154196a23cf985408c653be438cd Mon Sep 17 00:00:00 2001 From: Tushnim Bhattacharyya Date: Mon, 21 Aug 2017 13:01:21 -0700 Subject: [PATCH] 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 --- .../policy_mgr/src/wlan_policy_mgr_get_set_utils.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/umac/cmn_services/policy_mgr/src/wlan_policy_mgr_get_set_utils.c b/umac/cmn_services/policy_mgr/src/wlan_policy_mgr_get_set_utils.c index 1b64f22c45e5..a93c6c31db21 100644 --- a/umac/cmn_services/policy_mgr/src/wlan_policy_mgr_get_set_utils.c +++ b/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)