aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2009-04-16 13:46:12 -0700
committerEric Anholt <eric@anholt.net>2009-04-17 13:30:50 -0700
commit07f4f8bf436e3f389a12cb792ad16275b9091b51 (patch)
treea3851f3db5201ac6b61fb8041f88a22f1c2eefe2 /drivers
parentf544847fbaf099278343f875987a983f2b913134 (diff)
drm/i915: Don't let an oops get triggered from irq_emit without dma init.
Userland is broken if it's trying this, but we also shouldn't allow oopses. Signed-off-by: Eric Anholt <eric@anholt.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/i915/i915_irq.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
index ee7ce7b78cf..98bb4c878c4 100644
--- a/drivers/gpu/drm/i915/i915_irq.c
+++ b/drivers/gpu/drm/i915/i915_irq.c
@@ -406,7 +406,7 @@ int i915_irq_emit(struct drm_device *dev, void *data,
drm_i915_irq_emit_t *emit = data;
int result;
- if (!dev_priv) {
+ if (!dev_priv || !dev_priv->ring.virtual_start) {
DRM_ERROR("called with no initialization\n");
return -EINVAL;
}