qcacld-3.0: Set num_dbs_hw_modes to 0 on malloc failure
Set num_dbs_hw_modes to 0 on malloc failure. Change-Id: I29c1a54b290892c149c2c84250042a7115a1d07a CRs-Fixed: 2781988
This commit is contained in:
parent
007da22d30
commit
804a370924
@ -669,7 +669,8 @@ QDF_STATUS policy_mgr_update_hw_mode_list(struct wlan_objmgr_psoc *psoc,
|
||||
pm_ctx->num_dbs_hw_modes);
|
||||
if (!pm_ctx->hw_mode.hw_mode_list) {
|
||||
policy_mgr_err("Memory allocation failed for DBS");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
pm_ctx->num_dbs_hw_modes = 0;
|
||||
return QDF_STATUS_E_NOMEM;
|
||||
}
|
||||
|
||||
policy_mgr_debug("Updated HW mode list: Num modes:%d",
|
||||
@ -726,6 +727,7 @@ void policy_mgr_init_dbs_hw_mode(struct wlan_objmgr_psoc *psoc,
|
||||
pm_ctx->num_dbs_hw_modes);
|
||||
if (!pm_ctx->hw_mode.hw_mode_list) {
|
||||
policy_mgr_err("Memory allocation failed for DBS");
|
||||
pm_ctx->num_dbs_hw_modes = 0;
|
||||
return;
|
||||
}
|
||||
qdf_mem_copy(pm_ctx->hw_mode.hw_mode_list,
|
||||
|
Loading…
Reference in New Issue
Block a user