summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManjunathappa Prakash <prakashpm@codeaurora.org>2016-10-03 17:22:16 -0700
committerqcabuildsw <qcabuildsw@localhost>2016-10-05 11:55:30 -0700
commitacf3561f35f3ad3d3da282f44b91dd7e7a42e863 (patch)
treefc1d92111e3b0d10e5613749c842609314593161
parent0a4bd746b2f4deb406e785669b940dce21c6ca47 (diff)
qcacld-3.0: Do NULL check on adapter->dev in hdd_lro_flush
Fix the issue due NULL pointer access on adapter->dev. One of the instance this happened is inside __hdd_hostapd_uninit(). Change-Id: Ie2a3e41d446261cd32729b8eb8f12e23134a8828 CRs-Fixed: 1073808
-rw-r--r--core/hdd/src/wlan_hdd_lro.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/core/hdd/src/wlan_hdd_lro.c b/core/hdd/src/wlan_hdd_lro.c
index 857d2c154a7a..35902f28fee5 100644
--- a/core/hdd/src/wlan_hdd_lro.c
+++ b/core/hdd/src/wlan_hdd_lro.c
@@ -461,7 +461,9 @@ void hdd_lro_flush(void *data)
while (NULL != adapter_node && QDF_STATUS_SUCCESS == status) {
adapter = adapter_node->pAdapter;
hdd_lro = &adapter->lro_info;
- if (adapter->dev->features & NETIF_F_LRO) {
+ if (adapter->dev == NULL) {
+ hdd_err("vdev interface going down");
+ } else if (adapter->dev->features & NETIF_F_LRO) {
qdf_spin_lock_bh(&hdd_lro->lro_mgr_arr_access_lock);
for (i = 0; i < hdd_lro->lro_mgr->max_desc; i++) {
if (hdd_lro->lro_mgr->lro_arr[i].active) {