From a27af4c4a665864df09123f177ca7269e48f6171 Mon Sep 17 00:00:00 2001
From: Thomas Hellstrom <thomas-at-tungstengraphics-dot-com>
Date: Fri, 29 Jun 2007 15:22:28 +0200
Subject: Avoid hitting BUG() for kernel-only fence objects.

---
 linux-core/drm_fence.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/linux-core/drm_fence.c b/linux-core/drm_fence.c
index ace70d51..5215feb6 100644
--- a/linux-core/drm_fence.c
+++ b/linux-core/drm_fence.c
@@ -450,6 +450,12 @@ static int drm_fence_object_init(drm_device_t * dev, uint32_t class,
 
 	write_lock_irqsave(&fm->lock, flags);
 	INIT_LIST_HEAD(&fence->ring);
+
+	/* 
+	 *  Avoid hitting BUG() for kernel-only fence objects.
+	 */
+
+	INIT_LIST_HEAD(&fence->base.list);
 	fence->class = class;
 	fence->type = type;
 	fence->flush_mask = 0;
-- 
cgit v1.2.3