summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2008-03-24 18:52:26 +1000
committerDave Airlie <airlied@redhat.com>2008-03-24 18:52:26 +1000
commitb0817a42e789a83454e6acba0578116829e2bf51 (patch)
treec83fbc185416839d91834555dd49b6fb1ee6992c
parent4323ee3e5b263a1dc8cfdf72485a20a3c1d8f144 (diff)
i915: fix oops on agp=off
Kernel bug 10289.
-rw-r--r--shared-core/i915_dma.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/shared-core/i915_dma.c b/shared-core/i915_dma.c
index 407befcc..1e493e38 100644
--- a/shared-core/i915_dma.c
+++ b/shared-core/i915_dma.c
@@ -1060,6 +1060,10 @@ void i915_driver_lastclose(struct drm_device * dev)
{
drm_i915_private_t *dev_priv = dev->dev_private;
+ /* agp off can use this to get called before dev_priv */
+ if (!dev_priv)
+ return;
+
#ifdef I915_HAVE_BUFFER
if (dev_priv->val_bufs) {
vfree(dev_priv->val_bufs);