diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 33a8244bdd26..8717b9cd3554 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -12262,20 +12262,21 @@ int hdd_psoc_idle_shutdown(struct device *dev) return -EINVAL; } - /* - * This is to handle scenario in which platform driver triggers - * idle_shutdown if Deep Sleep/Hibernate entry notification is - * received from modem subsystem in wearable devices - */ - if (hdd_is_any_interface_open(hdd_ctx)) { - hdd_err_rl("all interfaces are not down, ignore idle shutdown"); - return -EINVAL; - } - if (is_mode_change_psoc_idle_shutdown) ret = __hdd_mode_change_psoc_idle_shutdown(hdd_ctx); - else + else { + /* + * This is to handle scenario in which platform driver triggers + * idle_shutdown if Deep Sleep/Hibernate entry notification is + * received from modem subsystem in wearable devices + */ + if (hdd_is_any_interface_open(hdd_ctx)) { + hdd_err_rl("all interfaces are not down, ignore idle shutdown"); + return -EINVAL; + } + ret = __hdd_psoc_idle_shutdown(hdd_ctx); + } return ret; }