diff options
author | Dave Airlie <airlied@linux.ie> | 2008-03-29 17:53:58 -0400 |
---|---|---|
committer | Dave Airlie <airlied@linux.ie> | 2008-03-29 17:53:58 -0400 |
commit | 144a75fa1faa4a81530bded2e59872ef80d496b6 (patch) | |
tree | 34caab94365cd11ad39a0e551f68072db79c97fd | |
parent | 0c76be35194563f56e02fc1775d0fe29281e84d4 (diff) |
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>
-rw-r--r-- | drivers/char/drm/i915_dma.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/char/drm/i915_dma.c b/drivers/char/drm/i915_dma.c index e9d6663bec73..a043bb12301a 100644 --- a/drivers/char/drm/i915_dma.c +++ b/drivers/char/drm/i915_dma.c | |||
@@ -804,6 +804,9 @@ void i915_driver_lastclose(struct drm_device * dev) | |||
804 | { | 804 | { |
805 | drm_i915_private_t *dev_priv = dev->dev_private; | 805 | drm_i915_private_t *dev_priv = dev->dev_private; |
806 | 806 | ||
807 | if (!dev_priv) | ||
808 | return; | ||
809 | |||
807 | if (dev_priv->agp_heap) | 810 | if (dev_priv->agp_heap) |
808 | i915_mem_takedown(&(dev_priv->agp_heap)); | 811 | i915_mem_takedown(&(dev_priv->agp_heap)); |
809 | 812 | ||