Browse Source

qcacmn: Initialize local variable before using it

Do not use API to do variable initialization job.
Otherwise there is built error in some platform.

Change-Id: I489057a2753bf7bf091e87b902efa833ea90ece9
CRs-Fixed: 3471557
Bing Sun 2 năm trước cách đây
mục cha
commit
84d654cc7c
1 tập tin đã thay đổi với 5 bổ sung2 xóa
  1. 5 2
      umac/mlo_mgr/src/wlan_mlo_mgr_cmn.c

+ 5 - 2
umac/mlo_mgr/src/wlan_mlo_mgr_cmn.c

@@ -817,8 +817,8 @@ static void ml_extract_link_state(struct wlan_objmgr_psoc *psoc,
 				  struct ml_link_state_info_event *event)
 {
 	QDF_STATUS status;
-	get_ml_link_state_cb resp_cb;
-	void *context;
+	get_ml_link_state_cb resp_cb = NULL;
+	void *context = NULL;
 	uint8_t vdev_id;
 
 	vdev_id = event->vdev_id;
@@ -826,6 +826,9 @@ static void ml_extract_link_state(struct wlan_objmgr_psoc *psoc,
 	status = mlo_get_link_state_context(psoc,
 					    &resp_cb, &context, vdev_id);
 
+	if (QDF_IS_STATUS_ERROR(status))
+		return;
+
 	if (resp_cb)
 		resp_cb(event, context);
 }