Merge "disp: msm: sde: add out of bound check for interrupt id"

This commit is contained in:
qctecmdr
2023-07-26 05:56:21 -07:00
committed by Gerrit - the friendly Code Review server

View File

@@ -635,8 +635,8 @@ int sde_encoder_helper_unregister_irq(struct sde_encoder_phys *phys_enc,
struct sde_encoder_irq *irq;
int ret;
if (!phys_enc) {
SDE_ERROR("invalid encoder\n");
if (!phys_enc || intr_idx >= INTR_IDX_MAX) {
SDE_ERROR("invalid params\n");
return -EINVAL;
}
irq = &phys_enc->irq[intr_idx];