diff --git a/components/pmo/core/src/wlan_pmo_suspend_resume.c b/components/pmo/core/src/wlan_pmo_suspend_resume.c index f0d288f48eb5..bbaabf4410bf 100644 --- a/components/pmo/core/src/wlan_pmo_suspend_resume.c +++ b/components/pmo/core/src/wlan_pmo_suspend_resume.c @@ -438,6 +438,8 @@ static void pmo_core_enable_runtime_pm_offloads(struct wlan_objmgr_psoc *psoc) /* Iterate through VDEV list */ for (vdev_id = 0; vdev_id < WLAN_UMAC_PSOC_MAX_VDEVS; vdev_id++) { vdev = pmo_psoc_get_vdev(psoc, vdev_id); + if (!vdev) + continue; status = pmo_vdev_get_ref(vdev); if (QDF_IS_STATUS_ERROR(status)) continue; @@ -456,6 +458,8 @@ static void pmo_core_disable_runtime_pm_offloads(struct wlan_objmgr_psoc *psoc) /* Iterate through VDEV list */ for (vdev_id = 0; vdev_id < WLAN_UMAC_PSOC_MAX_VDEVS; vdev_id++) { vdev = pmo_psoc_get_vdev(psoc, vdev_id); + if (!vdev) + continue; status = pmo_vdev_get_ref(vdev); if (QDF_IS_STATUS_ERROR(status)) continue;