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>
This commit is contained in:
Eric Anholt 2009-04-16 13:46:12 -07:00
parent f544847fba
commit 07f4f8bf43

View file

@ -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;
}