Commit cddb85dc authored by Matthew Auld's avatar Matthew Auld Committed by Chris Wilson

drm/i915/lmem: fixup fake lmem teardown

We should not be unconditionally calling release_fake_lmem_bar.
Signed-off-by: default avatarMatthew Auld <matthew.auld@intel.com>
Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20191106123135.12441-1-matthew.auld@intel.com
parent 1e460bf9
...@@ -51,8 +51,10 @@ static int init_fake_lmem_bar(struct intel_memory_region *mem) ...@@ -51,8 +51,10 @@ static int init_fake_lmem_bar(struct intel_memory_region *mem)
static void release_fake_lmem_bar(struct intel_memory_region *mem) static void release_fake_lmem_bar(struct intel_memory_region *mem)
{ {
if (drm_mm_node_allocated(&mem->fake_mappable)) if (!drm_mm_node_allocated(&mem->fake_mappable))
drm_mm_remove_node(&mem->fake_mappable); return;
drm_mm_remove_node(&mem->fake_mappable);
dma_unmap_resource(&mem->i915->drm.pdev->dev, dma_unmap_resource(&mem->i915->drm.pdev->dev,
mem->remap_addr, mem->remap_addr,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment