From cede8ed032442f902ca8d376859ffedd653eed9b Mon Sep 17 00:00:00 2001 From: Abhiram Jogadenu Date: Fri, 19 Jul 2019 22:55:28 +0530 Subject: [PATCH] qcacmn: Correct the error handling in event registration wmi_oem_response_event_id is only defined for TLV based architectures. Current code returns an error if registration to a particular event fails. But registration failure is not wrong for legacy architectures, as event is not defined. So do not check return value for error Change-Id: Ia54431cee2958b59166394360a3fc961abad85ce CRs-Fixed: 2492494 --- target_if/wifi_pos/src/target_if_wifi_pos.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/target_if/wifi_pos/src/target_if_wifi_pos.c b/target_if/wifi_pos/src/target_if_wifi_pos.c index ec2f507dc11a..3d30ec7a8939 100644 --- a/target_if/wifi_pos/src/target_if_wifi_pos.c +++ b/target_if/wifi_pos/src/target_if_wifi_pos.c @@ -336,15 +336,14 @@ QDF_STATUS target_if_wifi_pos_register_events(struct wlan_objmgr_psoc *psoc) return QDF_STATUS_E_INVAL; } - ret = wmi_unified_register_event_handler( + /* wmi_oem_response_event_id is not defined for legacy targets. + * So do not check for error for this event. + */ + wmi_unified_register_event_handler( get_wmi_unified_hdl_from_psoc(psoc), wmi_oem_response_event_id, target_if_wifi_pos_oem_rsp_ev_handler, WMI_RX_WORK_CTX); - if (ret) { - target_if_err("register_event_handler failed: err %d", ret); - return QDF_STATUS_E_INVAL; - } ret = wmi_unified_register_event_handler( get_wmi_unified_hdl_from_psoc(psoc),