wlan: Fix issues reported by code inspection tool
Address issues found by third party code inspection tool
Change-Id: I873bc845487a72338ef5aaf705c54d005284b45d
CRs-fixed: 555246
diff --git a/CORE/HDD/src/wlan_hdd_debugfs.c b/CORE/HDD/src/wlan_hdd_debugfs.c
index 26ebde0..9d36ff4 100644
--- a/CORE/HDD/src/wlan_hdd_debugfs.c
+++ b/CORE/HDD/src/wlan_hdd_debugfs.c
@@ -117,7 +117,7 @@
const char __user *buf, size_t count, loff_t *ppos)
{
hdd_adapter_t *pAdapter = (hdd_adapter_t *)file->private_data;
- hdd_context_t *pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
+ hdd_context_t *pHddCtx;
tSirAddPeriodicTxPtrn *addPeriodicTxPtrnParams;
tSirDelPeriodicTxPtrn *delPeriodicTxPtrnParams;
@@ -137,6 +137,8 @@
return -EINVAL;
}
+ pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
+
if (!sme_IsFeatureSupportedByFW(WLAN_PERIODIC_TX_PTRN))
{
VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,