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
This commit is contained in:
Manjunathappa Prakash 2016-10-03 17:22:16 -07:00 • committed by qcabuildsw
commit acf3561f35

View file

@ -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) {