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
This commit is contained in:
Kiran Venkatappa
2021-01-26 23:44:42 +05:30
committed by snandini
parent 5743559888
commit 53d0aec26d

View File

@@ -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);