qcacld-3.0: Fix defects detected by Static code analyser

qcacld-2.0 to qcacld-3.0 propagation

Static code analyser detects uninitialized pointer/structure
access and dereferencing a pointer without null check.
As part of this fix host will initialize pointer/structure before
accessing it and put a null check for pointer access.

Change-Id: I5647b36a6ba0e84354d39799bf68a28df633cf20
CRs-Fixed: 836071
diff --git a/core/hdd/src/wlan_hdd_ipa.c b/core/hdd/src/wlan_hdd_ipa.c
index c7efbc1..7f6ed0b 100644
--- a/core/hdd/src/wlan_hdd_ipa.c
+++ b/core/hdd/src/wlan_hdd_ipa.c
@@ -2596,6 +2596,7 @@
 	struct hdd_ipa_pm_tx_cb *pm_tx_cb = NULL;
 	CDF_STATUS status = CDF_STATUS_SUCCESS;
 
+	iface_context = (struct hdd_ipa_iface_context *)priv;
 	if (evt != IPA_RECEIVE) {
 		skb = (cdf_nbuf_t) data;
 		dev_kfree_skb_any(skb);
@@ -2603,7 +2604,6 @@
 		return;
 	}
 
-	iface_context = (struct hdd_ipa_iface_context *)priv;
 	ipa_tx_desc = (struct ipa_rx_data *)data;
 
 	hdd_ipa = iface_context->hdd_ipa;