qcacld-3.0: Handle error returned by cfg_parse

Host driver should exit if it fails to initialize
__cfg_global_store to avoid assertion hit.

Change-Id: I404e5da69cd2c4cf06d55a1d7a96d0aee1e5e4a4
CRs-Fixed: 2454969
This commit is contained in:
nakul kachhwaha 2019-05-21 14:20:06 +05:30 • committed by nshrivas
commit ed09dc9304

View file

@ -9644,14 +9644,17 @@ struct hdd_context *hdd_context_create(struct device *dev)
}
status = cfg_parse(WLAN_INI_FILE);
if (QDF_IS_STATUS_ERROR(status))
if (QDF_IS_STATUS_ERROR(status)) {
hdd_err("Failed to parse cfg %s; status:%d\n",
WLAN_INI_FILE, status);
ret = qdf_status_to_os_return(status);
goto err_free_config;
}
ret = hdd_objmgr_create_and_store_psoc(hdd_ctx, DEFAULT_PSOC_ID);
if (ret) {
QDF_DEBUG_PANIC("Psoc creation fails!");
goto err_free_config;
goto err_release_store;
}
hdd_cfg_params_init(hdd_ctx);
@ -9706,6 +9709,9 @@ err_deinit_hdd_context:
err_hdd_objmgr_destroy:
hdd_objmgr_release_and_destroy_psoc(hdd_ctx);
err_release_store:
cfg_release();
err_free_config:
qdf_mem_free(hdd_ctx->config);