mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 22:40:54 -04:00
qcacmn: simplify error handling in ce_init(1)
move ce_id_to_state assignment to the end where ce_init is guaranteed to succeed. Change-Id: I5172eb1136dde2aad915c2497ece94150c95630f CRs-Fixed: 2020794
This commit is contained in:
parent
748e1a690f
commit
b01db18853
1 changed files with 1 additions and 3 deletions
|
|
@ -897,7 +897,6 @@ struct CE_handle *ce_init(struct hif_softc *scn,
|
|||
return NULL;
|
||||
}
|
||||
malloc_CE_state = true;
|
||||
scn->ce_id_to_state[CE_id] = CE_state;
|
||||
qdf_spinlock_create(&CE_state->ce_index_lock);
|
||||
|
||||
CE_state->id = CE_id;
|
||||
|
|
@ -942,7 +941,6 @@ struct CE_handle *ce_init(struct hif_softc *scn,
|
|||
HIF_ERROR("%s: src ring has no mem", __func__);
|
||||
if (malloc_CE_state) {
|
||||
/* allocated CE_state locally */
|
||||
scn->ce_id_to_state[CE_id] = NULL;
|
||||
qdf_mem_free(CE_state);
|
||||
malloc_CE_state = false;
|
||||
}
|
||||
|
|
@ -1011,7 +1009,6 @@ struct CE_handle *ce_init(struct hif_softc *scn,
|
|||
}
|
||||
if (malloc_CE_state) {
|
||||
/* allocated CE_state locally */
|
||||
scn->ce_id_to_state[CE_id] = NULL;
|
||||
qdf_mem_free(CE_state);
|
||||
malloc_CE_state = false;
|
||||
}
|
||||
|
|
@ -1094,6 +1091,7 @@ struct CE_handle *ce_init(struct hif_softc *scn,
|
|||
|
||||
/* update the htt_data attribute */
|
||||
ce_mark_datapath(CE_state);
|
||||
scn->ce_id_to_state[CE_id] = CE_state;
|
||||
|
||||
return (struct CE_handle *)CE_state;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue