1
0
Fork 0

drm/msm/mdp5: remove less than 0 comparison for unsigned value

pipe is an unsigned int and less than zero comparison for unsigned
values is always false.

Detected using the following cocci script:

@@
unsigned int i;
@@
* i < 0

Signed-off-by: Aishwarya Pant <aishpant@gmail.com>
Reviewed-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20171010184207.iv3dinrtwvbv7fei@aishwarya
hifive-unleashed-5.1
Aishwarya Pant 2017-10-11 00:12:07 +05:30 committed by Daniel Vetter
parent e25f1f7c94
commit 0c17151aaa
1 changed files with 1 additions and 1 deletions

View File

@ -599,7 +599,7 @@ static u32 mdp5_get_vblank_counter(struct drm_device *dev, unsigned int pipe)
struct drm_crtc *crtc;
struct drm_encoder *encoder;
if (pipe < 0 || pipe >= priv->num_crtcs)
if (pipe >= priv->num_crtcs)
return 0;
crtc = priv->crtcs[pipe];