i915: fix oops on agp=off

Kernel bug 10289.
main
Dave Airlie 2008-03-24 18:52:26 +10:00
parent 4323ee3e5b
commit b0817a42e7
1 changed files with 4 additions and 0 deletions

View File

@ -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);