disp: msm: sde: add buffer size checks

Add buffer size checks to improve code quality.

Change-Id: I99c64d6157d7b0475b0b28e093ea70820981fddd
Signed-off-by: Yu Wu <quic_zwy@quicinc.com>
Esse commit está contido em:
Yu Wu
2023-07-04 14:06:50 +08:00
commit bb70fda262

Ver arquivo

@@ -4072,7 +4072,7 @@ static bool _sde_crtc_wait_for_fences(struct drm_crtc *crtc)
MAX_HW_FENCES);
/* register the hw-fences for hw-wait */
if (num_hw_fences) {
if (num_hw_fences > 0 && num_hw_fences <= MAX_HW_FENCES) {
ret = sde_fence_register_hw_fences_wait(hw_ctl, dma_hw_fences, num_hw_fences);
if (ret) {