mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 07:03:09 -04:00
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
This commit is contained in:
parent
51c449481e
commit
81661ae7f2
2 changed files with 3 additions and 4 deletions
|
|
@ -2596,6 +2596,7 @@ static void hdd_ipa_i2w_cb(void *priv, enum ipa_dp_evt_type evt,
|
|||
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 @@ static void hdd_ipa_i2w_cb(void *priv, enum ipa_dp_evt_type evt,
|
|||
return;
|
||||
}
|
||||
|
||||
iface_context = (struct hdd_ipa_iface_context *)priv;
|
||||
ipa_tx_desc = (struct ipa_rx_data *)data;
|
||||
|
||||
hdd_ipa = iface_context->hdd_ipa;
|
||||
|
|
|
|||
|
|
@ -4898,6 +4898,7 @@ static int __iw_setint_getnone(struct net_device *dev,
|
|||
int enable_pbm, enable_mp;
|
||||
|
||||
INIT_COMPLETION(pWextState->completion_var);
|
||||
memset(&smeConfig, 0x00, sizeof(smeConfig));
|
||||
|
||||
hdd_ctx = WLAN_HDD_GET_CTX(pAdapter);
|
||||
ret = wlan_hdd_validate_context(hdd_ctx);
|
||||
|
|
@ -4910,7 +4911,6 @@ static int __iw_setint_getnone(struct net_device *dev,
|
|||
if ((ENABLE_11D == set_value)
|
||||
|| (DISABLE_11D == set_value)) {
|
||||
|
||||
memset(&smeConfig, 0x00, sizeof(smeConfig));
|
||||
sme_get_config_param(hHal, &smeConfig);
|
||||
smeConfig.csrConfig.Is11dSupportEnabled =
|
||||
(bool) set_value;
|
||||
|
|
@ -5401,7 +5401,6 @@ static int __iw_setint_getnone(struct net_device *dev,
|
|||
nChannelBondingMode5GHz)))
|
||||
chwidth = true;
|
||||
|
||||
memset(&smeConfig, 0x00, sizeof(smeConfig));
|
||||
sme_get_config_param(hHal, &smeConfig);
|
||||
switch (set_value) {
|
||||
case eHT_CHANNEL_WIDTH_20MHZ:
|
||||
|
|
@ -7000,7 +6999,7 @@ static int __iw_get_char_setnone(struct net_device *dev,
|
|||
adapter_num++;
|
||||
}
|
||||
|
||||
if (pMac) {
|
||||
if (hHal) {
|
||||
/* Printing Lim State starting with global lim states */
|
||||
buf =
|
||||
scnprintf(extra + len, WE_MAX_STR_LEN - len,
|
||||
|
|
|
|||
Loading…
Reference in a new issue