qcacld-3.0: Validate vdev before try to get vdev ref

Validate vdev and make sure its not null before try to get vdev ref
during runtime pm suspend/resume path.

Change-Id: Ieb9cb26703727edbc302447453000e1d33717343
CRs-Fixed: 2715161
This commit is contained in:
Rajeev Kumar 2020-06-20 17:39:07 -07:00 • committed by nshrivas
commit 770edce351

View file

@ -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;