From: Eric Anholt Date: Thu, 16 Apr 2009 20:46:12 +0000 (-0700) Subject: drm/i915: Don't let an oops get triggered from irq_emit without dma init. X-Git-Tag: v2.6.30-rc4~4^2~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=07f4f8bf436e3f389a12cb792ad16275b9091b51;p=profile%2Fivi%2Fkernel-x86-ivi.git 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 --- diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c index ee7ce7b..98bb4c8 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; }