drm/i915: Correct locking in the modesetting failure path, fixing a BUG_ON.
Eric Anholt [Mon, 9 Nov 2009 22:57:34 +0000 (14:57 -0800)]
Signed-off-by: Eric Anholt <eric@anholt.net>

drivers/gpu/drm/i915/i915_dma.c

index 7bfded5..281faca 100644 (file)
@@ -1405,7 +1405,9 @@ static int i915_load_modeset_init(struct drm_device *dev,
        return 0;
 
 destroy_ringbuffer:
+       mutex_lock(&dev->struct_mutex);
        i915_gem_cleanup_ringbuffer(dev);
+       mutex_unlock(&dev->struct_mutex);
 out:
        return ret;
 }