Explorar o código

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 %!s(int64=4) %!d(string=hai) anos
pai
achega
53d0aec26d
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  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);