qcacld-3.0: Modify HDD psoc create API to return OS status

HDD APIs should return native OS return code hence modify
hdd_create_and_store_psoc() to return native OS return code.

Change-Id: Ibc5a4f4aa5b9074d6924a8c5303d3adbeb4c8308
CRs-Fixed: 1111408
This commit is contained in:
Rajeev Kumar
2017-01-13 15:19:48 -08:00
committed by qcabuildsw
parent 0a19878496
commit 138ef91746
3 changed files with 7 additions and 7 deletions

View File

@@ -1779,8 +1779,8 @@ int hdd_wlan_start_modules(hdd_context_t *hdd_ctx, hdd_adapter_t *adapter,
goto ol_cds_free; goto ol_cds_free;
} }
status = hdd_create_and_store_psoc(hdd_ctx, DEFAULT_PSOC_ID); ret = hdd_create_and_store_psoc(hdd_ctx, DEFAULT_PSOC_ID);
if (QDF_IS_STATUS_ERROR(status)) { if (ret) {
hdd_err("Psoc creation fails!"); hdd_err("Psoc creation fails!");
goto ol_cds_free; goto ol_cds_free;
} }

View File

@@ -32,17 +32,17 @@
#include <wlan_hdd_object_manager.h> #include <wlan_hdd_object_manager.h>
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; struct wlan_objmgr_psoc *psoc;
psoc = wlan_objmgr_psoc_obj_create(psoc_id, WLAN_DEV_OL); psoc = wlan_objmgr_psoc_obj_create(psoc_id, WLAN_DEV_OL);
if (!psoc) if (!psoc)
return QDF_STATUS_E_FAILURE; return -ENOMEM;
hdd_ctx->hdd_psoc = psoc; hdd_ctx->hdd_psoc = psoc;
return QDF_STATUS_SUCCESS; return 0;
} }
QDF_STATUS hdd_release_and_destroy_psoc(hdd_context_t *hdd_ctx) QDF_STATUS hdd_release_and_destroy_psoc(hdd_context_t *hdd_ctx)

View File

@@ -71,9 +71,9 @@
* This API creates Psoc object with given @psoc_id and store the psoc reference * This API creates Psoc object with given @psoc_id and store the psoc reference
* to hdd context * 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 * hdd_release_and_destroy_psoc() - Deletes the psoc object