diff options
| author | Krishna Kumaar Natarajan <kknatara@qca.qualcomm.com> | 2015-02-20 12:15:19 -0800 |
|---|---|---|
| committer | AnjaneeDevi Kapparapu <c_akappa@qti.qualcomm.com> | 2015-02-23 15:07:35 +0530 |
| commit | 9ecd373df78998f26cd98b188fe28da3e818e7f2 (patch) | |
| tree | cc67757c38161015fc99f2b8db6c2814712bc4da | |
| parent | b55cbe9d20720a2c33f99e93dc3fb0ec5e1fd748 (diff) | |
wlan: Fix for issue reported by Static Analysis tool
This is prima to qcacld-2.0 propagation
In WLANSAP_ScanCallback(), initialization of event is
after the if block which could leave the event uninitialized
due to the break in the if block. To address this, initialize
the event before if block.
Change-Id: I38cb2ef2cfe8c7b36d3c6e6374fbee764e2272f1
CRs-Fixed: 797296
| -rw-r--r-- | CORE/SAP/src/sapApiLinkCntl.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/CORE/SAP/src/sapApiLinkCntl.c b/CORE/SAP/src/sapApiLinkCntl.c index e1a6df6a00e4..1d25a01de835 100644 --- a/CORE/SAP/src/sapApiLinkCntl.c +++ b/CORE/SAP/src/sapApiLinkCntl.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2014 The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2015 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -167,6 +167,8 @@ WLANSAP_ScanCallback // Get scan results, Run channel selection algorithm, select channel and keep in pSapContext->Channel scanGetResultStatus = sme_ScanGetResult(halHandle, psapContext->sessionId, NULL, &pResult); + event = eSAP_MAC_SCAN_COMPLETE; + if ((scanGetResultStatus != eHAL_STATUS_SUCCESS)&& (scanGetResultStatus != eHAL_STATUS_E_NULL_VALUE)) { // No scan results @@ -188,7 +190,6 @@ WLANSAP_ScanCallback operChannel = sapSelectChannel(halHandle, psapContext, pResult); sme_ScanResultPurge(halHandle, pResult); - event = eSAP_MAC_SCAN_COMPLETE; break; default: |
