diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index b938b7152662..ac655ee6ccfc 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -9267,6 +9267,11 @@ int hdd_psoc_idle_shutdown(struct device *dev) { struct hdd_context *hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD); + if (!hdd_ctx) { + hdd_err_rl("hdd ctx is null"); + return -EINVAL; + } + if (is_mode_change_psoc_idle_shutdown) return __hdd_mode_change_psoc_idle_shutdown(hdd_ctx); else @@ -9282,6 +9287,11 @@ int hdd_psoc_idle_restart(struct device *dev) { struct hdd_context *hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD); + if (!hdd_ctx) { + hdd_err_rl("hdd ctx is null"); + return -EINVAL; + } + return __hdd_psoc_idle_restart(hdd_ctx); }