diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 0a6423e897..633b7bcacb 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -1313,15 +1313,15 @@ static void hdd_update_ra_rate_limit(hdd_context_t *hdd_ctx, void hdd_update_tgt_cfg(void *context, void *param) { + int ret; hdd_context_t *hdd_ctx = (hdd_context_t *) context; struct wma_tgt_cfg *cfg = param; uint8_t temp_band_cap; struct cds_config_info *cds_cfg = cds_get_ini_config(); - QDF_STATUS qdf_status; - qdf_status = hdd_create_and_store_pdev(hdd_ctx); - if (QDF_IS_STATUS_ERROR(qdf_status)) { - hdd_err("Pdev creation fails!"); + ret = hdd_create_and_store_pdev(hdd_ctx); + if (ret) { + hdd_err("pdev creation fails!"); QDF_BUG(0); } diff --git a/core/hdd/src/wlan_hdd_object_manager.c b/core/hdd/src/wlan_hdd_object_manager.c index 579d4ff1f8..d3710b9fed 100644 --- a/core/hdd/src/wlan_hdd_object_manager.c +++ b/core/hdd/src/wlan_hdd_object_manager.c @@ -56,24 +56,24 @@ int hdd_release_and_destroy_psoc(hdd_context_t *hdd_ctx) return qdf_status_to_os_return(wlan_objmgr_psoc_obj_delete(psoc)); } -QDF_STATUS hdd_create_and_store_pdev(hdd_context_t *hdd_ctx) +int hdd_create_and_store_pdev(hdd_context_t *hdd_ctx) { struct wlan_objmgr_psoc *psoc = hdd_ctx->hdd_psoc; struct wlan_objmgr_pdev *pdev; if (!psoc) { hdd_err("Psoc NULL"); - return QDF_STATUS_E_FAILURE; + return -EINVAL; } pdev = wlan_objmgr_pdev_obj_create(psoc, NULL); if (!pdev) { hdd_err("pdev obj create failed"); - return QDF_STATUS_E_FAILURE; + return -ENOMEM; } hdd_ctx->hdd_pdev = pdev; - return QDF_STATUS_SUCCESS; + return 0; } QDF_STATUS hdd_release_and_destroy_pdev(hdd_context_t *hdd_ctx) diff --git a/core/hdd/src/wlan_hdd_object_manager.h b/core/hdd/src/wlan_hdd_object_manager.h index 3d1c83b11e..f4262de5b2 100644 --- a/core/hdd/src/wlan_hdd_object_manager.h +++ b/core/hdd/src/wlan_hdd_object_manager.h @@ -91,9 +91,9 @@ int hdd_release_and_destroy_psoc(hdd_context_t *hdd_ctx); * * This API creates the pdev object and store the pdev reference to hdd context * - * Return: QDF_STATUS + * Return: 0 for success, negative error code for failure */ -QDF_STATUS hdd_create_and_store_pdev(hdd_context_t *hdd_ctx); +int hdd_create_and_store_pdev(hdd_context_t *hdd_ctx); /** * hdd_release_and_destroy_pdev() - Deletes the pdev object