diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 3e30a7a96b86..76ec1eecf4e3 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -13628,6 +13628,9 @@ static int hdd_mode_change_psoc_idle_shutdown(struct device *dev) { struct hdd_context *hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD); + if (!hdd_ctx) + return -EINVAL; + return hdd_wlan_stop_modules(hdd_ctx, true); } @@ -13635,6 +13638,9 @@ static int hdd_mode_change_psoc_idle_restart(struct device *dev) { struct hdd_context *hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD); + if (!hdd_ctx) + return -EINVAL; + return hdd_wlan_start_modules(hdd_ctx, false); }