mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 06:09:23 -04:00
hgsl: Fix possible array index out of bound issue
To guarantee the array index is valid before use it Change-Id: If1b37777b633edf66dad8a9f5323b042cc3b9012 Signed-off-by: Kasin Li <donglil@codeaurora.org> Signed-off-by: Ya Tang <yatang@codeaurora.org>
This commit is contained in:
parent
c30dc7b7b1
commit
761724af63
1 changed files with 3 additions and 2 deletions
|
|
@ -358,8 +358,9 @@ static void gmu_ring_local_db(struct qcom_hgsl *hgsl, unsigned int value)
|
|||
static void tcsr_ring_global_db(struct qcom_hgsl *hgsl, uint32_t tcsr_idx,
|
||||
uint32_t dbq_idx)
|
||||
{
|
||||
hgsl_tcsr_irq_trigger(hgsl->tcsr[tcsr_idx][HGSL_TCSR_ROLE_SENDER],
|
||||
GLB_DB_SRC_ISSUEIB_IRQ_ID_0 + dbq_idx);
|
||||
if (tcsr_idx < HGSL_TCSR_NUM)
|
||||
hgsl_tcsr_irq_trigger(hgsl->tcsr[tcsr_idx][HGSL_TCSR_ROLE_SENDER],
|
||||
GLB_DB_SRC_ISSUEIB_IRQ_ID_0 + dbq_idx);
|
||||
}
|
||||
|
||||
static bool hgsl_ctx_dbq_ready(struct hgsl_priv *priv)
|
||||
|
|
|
|||
Loading…
Reference in a new issue