From: Dave Airlie Date: Mon, 24 Mar 2008 08:52:26 +0000 (+1000) Subject: i915: fix oops on agp=off X-Git-Tag: libdrm-2.3.1~78 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b0817a42e789a83454e6acba0578116829e2bf51;p=platform%2Fupstream%2Flibdrm.git i915: fix oops on agp=off Kernel bug 10289. --- diff --git a/shared-core/i915_dma.c b/shared-core/i915_dma.c index 407befc..1e493e3 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);