mirror of
https://gitlab.freedesktop.org/mesa/drm.git
synced 2026-01-03 10:30:25 +01:00
nouveau: don't try to traverse non-existent lists
Fixes nouveau_ioctl_mem_free Oops
This commit is contained in:
parent
97fdadee6a
commit
9c8d634e68
1 changed files with 3 additions and 3 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue