diff options
author | Stuart Bennett <stuart@freedesktop.org> | 2009-02-07 21:20:17 +0000 |
---|---|---|
committer | Stuart Bennett <stuart@freedesktop.org> | 2009-02-07 21:20:17 +0000 |
commit | 9c8d634e687a5a5b5d314b3fd5b34cc17a217139 (patch) | |
tree | 3caeb427cc29c60b4aef1404a83eed903de989f0 | |
parent | 97fdadee6a79f9406a55c235ee46104814321152 (diff) |
nouveau: don't try to traverse non-existent lists
Fixes nouveau_ioctl_mem_free Oops
-rw-r--r-- | shared-core/nouveau_mem.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/shared-core/nouveau_mem.c b/shared-core/nouveau_mem.c index 0d590276..74636dc2 100644 --- a/shared-core/nouveau_mem.c +++ b/shared-core/nouveau_mem.c @@ -809,11 +809,11 @@ nouveau_ioctl_mem_free(struct drm_device *dev, void *data, memfree->offset -= 512*1024*1024; block=NULL; - if (memfree->flags & NOUVEAU_MEM_FB) + if (dev_priv->fb_heap && memfree->flags & NOUVEAU_MEM_FB) block = find_block(dev_priv->fb_heap, memfree->offset); - else if (memfree->flags & NOUVEAU_MEM_AGP) + else if (dev_priv->agp_heap && memfree->flags & NOUVEAU_MEM_AGP) block = find_block(dev_priv->agp_heap, memfree->offset); - else if (memfree->flags & NOUVEAU_MEM_PCI) + else if (dev_priv->pci_heap && memfree->flags & NOUVEAU_MEM_PCI) block = find_block(dev_priv->pci_heap, memfree->offset); if (!block) return -EFAULT; |