From: Gerd Hoffmann <kraxel@redhat.com>
To: dri-devel@lists.freedesktop.org, virtio-dev@lists.oasis-open.org
Cc: airlied@gmail.com, airlied@redhat.com, mst@redhat.com,
Gerd Hoffmann <kraxel@redhat.com>,
David Airlie <airlied@linux.ie>,
linux-kernel@vger.kernel.org (open list)
Subject: [PATCH v2 2/4] drm_vblank_get: don't WARN_ON in case vblanks are not initialized
Date: Wed, 1 Apr 2015 15:15:28 +0200 [thread overview]
Message-ID: <1427894130-14228-3-git-send-email-kraxel@redhat.com> (raw)
In-Reply-To: <1427894130-14228-1-git-send-email-kraxel@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.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 10574a0..c631c1a 100644
--- a/drivers/gpu/drm/drm_irq.c
+++ b/drivers/gpu/drm/drm_irq.c
@@ -1026,6 +1026,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
next prev parent reply other threads:[~2015-04-01 13:16 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1427894130-14228-1-git-send-email-kraxel@redhat.com>
2015-04-01 13:15 ` [PATCH v2 1/4] break kconfig dependency loop Gerd Hoffmann
2015-04-01 13:47 ` Jani Nikula
2015-04-06 9:50 ` Paul Bolle
2015-04-06 14:27 ` Mauro Carvalho Chehab
[not found] ` <CAEG8a3+Wp-jgtwKmcBhG2gVAOP2tQ5MHuJwYe-m2HwYQRB06HQ@mail.gmail.com>
2015-04-01 15:08 ` Michael S. Tsirkin
2015-04-01 15:38 ` Gerd Hoffmann
2015-05-14 18:23 ` Mauro Carvalho Chehab
2015-04-01 13:15 ` Gerd Hoffmann [this message]
2015-04-02 13:37 ` [PATCH v2 2/4] drm_vblank_get: don't WARN_ON in case vblanks are not initialized Alex Deucher
2015-04-01 13:15 ` [PATCH v2 3/4] Add virtio gpu driver Gerd Hoffmann
2015-04-01 13:31 ` Michael S. Tsirkin
[not found] ` <CAJ+F1CK3ibbn8e1-rUY4OUJuaCt_=JmuT00Fqx4YDD9M5zJv=A@mail.gmail.com>
2015-04-07 9:41 ` Gerd Hoffmann
2015-04-01 13:15 ` [PATCH v2 4/4] Add virtio-vga bits Gerd Hoffmann
2015-04-01 13:26 ` Michael S. Tsirkin
2015-04-01 13:42 ` Gerd Hoffmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1427894130-14228-3-git-send-email-kraxel@redhat.com \
--to=kraxel@redhat.com \
--cc=airlied@gmail.com \
--cc=airlied@linux.ie \
--cc=airlied@redhat.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mst@redhat.com \
--cc=virtio-dev@lists.oasis-open.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).