Add missing release of allocated fb_info structure and move enable_mmio() to
fix error path.
Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
if (!request_mem_region(tridentfb_fix.mmio_start, tridentfb_fix.mmio_len, "tridentfb")) {
debug("request_region failed!\n");
+ framebuffer_release(info);
return -1;
}
goto out_unmap1;
}
- enable_mmio();
-
/* setup framebuffer memory */
tridentfb_fix.smem_start = pci_resource_start(dev, 0);
tridentfb_fix.smem_len = get_memsize(default_par);
goto out_unmap1;
}
+ enable_mmio();
+
info->screen_base = ioremap_nocache(tridentfb_fix.smem_start,
tridentfb_fix.smem_len);