From 3064cd6aab997d8caaead038657dbc833ca87230 Mon Sep 17 00:00:00 2001 From: Krishna Kumaar Natarajan Date: Wed, 1 Mar 2017 14:55:33 -0800 Subject: [PATCH] qcacmn: Fix incorrect status initialization Initialize status to QDF_STATUS_SUCCESS in populate_hw_mode_capability and populate_phy_reg_capability and update both functions to return qdf_status_to_os_return(status). This will ensure in non-failure scenario function always returns SUCCESS. Change-Id: Ie3a44baad9e9f52b74e1bd78802c54b0371a22ed CRs-Fixed: 2013723 --- target_if/init_deinit/src/service_ready_event_handler.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/target_if/init_deinit/src/service_ready_event_handler.c b/target_if/init_deinit/src/service_ready_event_handler.c index 33b68094bc20..5e94f5990eae 100644 --- a/target_if/init_deinit/src/service_ready_event_handler.c +++ b/target_if/init_deinit/src/service_ready_event_handler.c @@ -192,7 +192,7 @@ static int populate_hw_mode_capability(void *wmi_handle, uint8_t *event, uint8_t *total_mac_phy, struct ext_service_ready_param *service_param) { - QDF_STATUS status = QDF_STATUS_E_FAILURE; + QDF_STATUS status = QDF_STATUS_SUCCESS; uint8_t hw_idx; uint32_t num_hw_modes; @@ -225,7 +225,7 @@ static int populate_phy_reg_capability(void *handle, uint8_t *event, { uint8_t reg_idx; uint32_t num_phy_reg_cap; - QDF_STATUS status = QDF_STATUS_E_FAILURE; + QDF_STATUS status = QDF_STATUS_SUCCESS; num_phy_reg_cap = service_param->service_ext_param.num_phy; if (num_phy_reg_cap > MAX_PHY_REG_CAP) { @@ -243,7 +243,7 @@ static int populate_phy_reg_capability(void *handle, uint8_t *event, } } - return 0; + return qdf_status_to_os_return(status); } int init_deinit_service_ext_ready_event_handler(ol_scn_t scn_handle,