diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 7614d8c2a385..7c74e68a216e 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -15929,7 +15929,7 @@ exit: static void hdd_driver_unload(void) { struct osif_driver_sync *driver_sync; - struct hdd_context *hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD); + struct hdd_context *hdd_ctx; QDF_STATUS status; void *hif_ctx; @@ -15962,6 +15962,7 @@ static void hdd_driver_unload(void) cds_set_driver_loaded(false); cds_set_unload_in_progress(true); + hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD); if (hdd_ctx) { hdd_psoc_idle_timer_stop(hdd_ctx); /*