@@ -123,8 +123,8 @@ int dpu_core_irq_enable(struct dpu_kms *dpu_kms, int *irq_idxs, u32 irq_count)
DRM_ERROR("irq_idx=%d enable_count=%d\n", irq_idxs[0], counts);
for (i = 0; (i < irq_count) && !ret; i++)
- ret = _dpu_core_irq_enable(dpu_kms, irq_idxs[i]);
-
+ if (_dpu_core_irq_enable(dpu_kms, irq_idxs[i]) != 0)
+ ret = -EINVAL;
return ret;
}
@@ -178,8 +178,8 @@ int dpu_core_irq_disable(struct dpu_kms *dpu_kms, int *irq_idxs, u32 irq_count)
DRM_ERROR("irq_idx=%d enable_count=%d\n", irq_idxs[0], counts);
for (i = 0; (i < irq_count) && !ret; i++)
- ret = _dpu_core_irq_disable(dpu_kms, irq_idxs[i]);
-
+ if (_dpu_core_irq_disable(dpu_kms, irq_idxs[i]) != 0)
+ ret = -EINVAL;
return ret;
}
In function dpu_core_irq_enable & dpu_core_irq_disable, when some index enable or disable failed, return value will be covered by next success index. Upper call function will not catch this error, this maybe does not meet the expectation. This change is to make the code a bit more readable. Signed-off-by: Bernard Zhao <bernard@vivo.com> --- drivers/gpu/drm/msm/disp/dpu1/dpu_core_irq.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)