[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1432300312-24792-4-git-send-email-kraxel@redhat.com>
Date: Fri, 22 May 2015 15:11:51 +0200
From: Gerd Hoffmann <kraxel@...hat.com>
To: dri-devel@...ts.freedesktop.org
Cc: airlied@...hat.com, mst@...hat.com,
Gerd Hoffmann <kraxel@...hat.com>,
David Airlie <airlied@...ux.ie>,
linux-kernel@...r.kernel.org (open list)
Subject: [PATCH v3 3/4] drm_vblank_get: don't WARN_ON in case vblanks are not initialized
Signed-off-by: Gerd Hoffmann <kraxel@...hat.com>
Reviewed-by: Alex Deucher <alexander.deucher@....com>
---
drivers/gpu/drm/drm_irq.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c
index af9662e..265793c 100644
--- a/drivers/gpu/drm/drm_irq.c
+++ b/drivers/gpu/drm/drm_irq.c
@@ -1029,6 +1029,9 @@ int drm_vblank_get(struct drm_device *dev, int crtc)
unsigned long irqflags;
int ret = 0;
+ if (!dev->num_crtcs)
+ return -EINVAL;
+
if (WARN_ON(crtc >= dev->num_crtcs))
return -EINVAL;
--
1.8.3.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists