diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index c0ad5f2fa7..94792bd81f 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -1779,8 +1779,8 @@ int hdd_wlan_start_modules(hdd_context_t *hdd_ctx, hdd_adapter_t *adapter, goto ol_cds_free; } - status = hdd_create_and_store_psoc(hdd_ctx, DEFAULT_PSOC_ID); - if (QDF_IS_STATUS_ERROR(status)) { + ret = hdd_create_and_store_psoc(hdd_ctx, DEFAULT_PSOC_ID); + if (ret) { hdd_err("Psoc creation fails!"); goto ol_cds_free; } diff --git a/core/hdd/src/wlan_hdd_object_manager.c b/core/hdd/src/wlan_hdd_object_manager.c index c9bbec7655..22959f155a 100644 --- a/core/hdd/src/wlan_hdd_object_manager.c +++ b/core/hdd/src/wlan_hdd_object_manager.c @@ -32,17 +32,17 @@ #include -QDF_STATUS hdd_create_and_store_psoc(hdd_context_t *hdd_ctx, uint8_t psoc_id) +int hdd_create_and_store_psoc(hdd_context_t *hdd_ctx, uint8_t psoc_id) { struct wlan_objmgr_psoc *psoc; psoc = wlan_objmgr_psoc_obj_create(psoc_id, WLAN_DEV_OL); if (!psoc) - return QDF_STATUS_E_FAILURE; + return -ENOMEM; hdd_ctx->hdd_psoc = psoc; - return QDF_STATUS_SUCCESS; + return 0; } QDF_STATUS hdd_release_and_destroy_psoc(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 ee517ae4b1..6e26a4359a 100644 --- a/core/hdd/src/wlan_hdd_object_manager.h +++ b/core/hdd/src/wlan_hdd_object_manager.h @@ -71,9 +71,9 @@ * This API creates Psoc object with given @psoc_id and store the psoc reference * to hdd context * - * Return: QDF_STATUS + * Return: 0 for success, negative error code for failure */ -QDF_STATUS hdd_create_and_store_psoc(hdd_context_t *hdd_ctx, uint8_t psoc_id); +int hdd_create_and_store_psoc(hdd_context_t *hdd_ctx, uint8_t psoc_id); /** * hdd_release_and_destroy_psoc() - Deletes the psoc object