summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAishwarya Pant <aishpant@gmail.com>2017-10-11 00:12:07 +0530
committerDaniel Vetter <daniel.vetter@ffwll.ch>2017-10-11 13:17:52 +0200
commit0c17151aaae4f051ebdccde412e912631e450345 (patch)
treedb3c695ebff975ea3f487bb2cdb7106c06a95ea9
parente25f1f7c94e16d4493398300efa03e5b6c77fcbf (diff)
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
-rw-r--r--drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.c b/drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.c
index f7c0698fec40..7e829a8d1cb1 100644
--- a/drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.c
+++ b/drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.c
@@ -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];