Pārlūkot izejas kodu

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 gadi atpakaļ
vecāks
revīzija
53d0aec26d
1 mainītis faili ar 1 papildinājumiem un 0 dzēšanām
  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);