diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 7d5d683cf14b..62a6c51ad400 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -2403,6 +2403,12 @@ static int __hdd_open(struct net_device *dev) MTRACE(qdf_trace(QDF_MODULE_ID_HDD, TRACE_CODE_HDD_OPEN_REQUEST, adapter->sessionId, adapter->device_mode)); + /* Nothing to be done if device is unloading */ + if (cds_is_driver_unloading()) { + hdd_err("Driver is unloading can not open the hdd"); + return -EBUSY; + } + ret = wlan_hdd_validate_context(hdd_ctx); if (ret) return ret;