瀏覽代碼

drm/i915: fix oops on agp=off

From Kernel BZ 10289 - not sure why anyone would boot an intel with no agp
but it shouldn't crash.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Dave Airlie 17 年之前
父節點
當前提交
144a75fa1f
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      drivers/char/drm/i915_dma.c

+ 3 - 0
drivers/char/drm/i915_dma.c

@@ -804,6 +804,9 @@ void i915_driver_lastclose(struct drm_device * dev)
 {
 	drm_i915_private_t *dev_priv = dev->dev_private;
 
+	if (!dev_priv)
+		return;
+
 	if (dev_priv->agp_heap)
 		i915_mem_takedown(&(dev_priv->agp_heap));