瀏覽代碼

qcacmn: Set error code when ce_init fails to alloc ce_state

Set proper error code when ce_state creation fails. Sending success from
here results in inconsistent state of CE data structures resulting in
invalid access. Send failure as return so that proper handling is done
by the caller.

CRs-Fixed: 2855116
Change-Id: I9c063760656a8125e627aaa62b309a2bb4c0ac6f
Kiran Venkatappa 4 年之前
父節點
當前提交
53d0aec26d
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      hif/src/ce/ce_main.c

+ 1 - 0
hif/src/ce/ce_main.c

@@ -3646,6 +3646,7 @@ int hif_config_ce_by_id(struct hif_softc *scn, int pipe_num)
 	ce_state = scn->ce_id_to_state[pipe_num];
 	if (!ce_state) {
 		A_TARGET_ACCESS_UNLIKELY(scn);
+		rv = QDF_STATUS_E_FAILURE;
 		goto err;
 	}
 	qdf_spinlock_create(&pipe_info->recv_bufs_needed_lock);