[PATCH] drm/msm/mdp5: Remove "pipe < 0" check
Vedran Miletić
vedran at miletic.net
Wed Jun 29 12:51:10 UTC 2016
From: David Binderman <linuxdev.baldrick at gmail.com>
For usingned int pipe, pipe < 0 is always true.
---
drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.c b/drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.c
index 484b4d1..352b7ad 100644
--- a/drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.c
+++ b/drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.c
@@ -542,7 +542,7 @@ static int mdp5_get_vblank_timestamp(struct drm_device *dev, unsigned int pipe,
struct msm_drm_private *priv = dev->dev_private;
struct drm_crtc *crtc;
- if (pipe < 0 || pipe >= priv->num_crtcs) {
+ if (pipe >= priv->num_crtcs) {
DRM_ERROR("Invalid crtc %d\n", pipe);
return -EINVAL;
}
@@ -564,7 +564,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];
--
2.8.1
More information about the dri-devel
mailing list