diff options
| author | Hanumanth Reddy Pothula <c_hpothu@codeaurora.org> | 2016-11-09 21:32:16 +0530 |
|---|---|---|
| committer | qcabuildsw <qcabuildsw@localhost> | 2016-11-10 06:09:37 -0800 |
| commit | af4c45ece002cc4fa768654c506b02e0bb25c121 (patch) | |
| tree | 51154594f645d59e5b62ad4f63349e795a435812 | |
| parent | dfc1b4e04f6edd91b56e034e6a53e2cbdc2d999a (diff) | |
qcacld-3.0: Handle error cases cleanly during open adapter
While processing open adapter, error handling is not taken
care appropriately, leading to device crash due to invalid
memory access.
Handle error cases cleanly while processing open adapter.
Change-Id: If01d1018ddc3b9a17c4d059c30bcc3a424538c3e
CRs-Fixed: 1087824
| -rw-r--r-- | core/hdd/src/wlan_hdd_main.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 3146833d94d4..e5c6d9f993e1 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -3243,7 +3243,7 @@ hdd_adapter_t *hdd_open_adapter(hdd_context_t *hdd_ctx, uint8_t session_type, status = hdd_register_interface(adapter, rtnl_held); if (QDF_STATUS_SUCCESS != status) { hdd_deinit_adapter(hdd_ctx, adapter, rtnl_held); - goto err_lro_cleanup; + goto err_free_netdev; } /* Stop the Interface TX queue. */ @@ -3340,7 +3340,7 @@ hdd_adapter_t *hdd_open_adapter(hdd_context_t *hdd_ctx, uint8_t session_type, /* Initialize the WoWL service */ if (!hdd_init_wowl(adapter)) { hdd_alert("hdd_init_wowl failed"); - goto err_lro_cleanup; + goto err_close_adapter; } /* Adapter successfully added. Increment the vdev count */ @@ -3357,11 +3357,11 @@ hdd_adapter_t *hdd_open_adapter(hdd_context_t *hdd_ctx, uint8_t session_type, return adapter; -err_lro_cleanup: - hdd_lro_disable(hdd_ctx, adapter); +err_close_adapter: + hdd_close_adapter(hdd_ctx, adapter, rtnl_held); err_free_netdev: - free_netdev(adapter->dev); wlan_hdd_release_intf_addr(hdd_ctx, adapter->macAddressCurrent.bytes); + free_netdev(adapter->dev); return NULL; } |
