Commit 3876ae8b authored by Krzysztof Helt's avatar Krzysztof Helt Committed by Linus Torvalds

tridentfb: improve probe function

Add missing release of allocated fb_info structure and move enable_mmio() to
fix error path.
Signed-off-by: default avatarKrzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 6bdf1035
...@@ -1287,6 +1287,7 @@ static int __devinit trident_pci_probe(struct pci_dev *dev, ...@@ -1287,6 +1287,7 @@ static int __devinit trident_pci_probe(struct pci_dev *dev,
if (!request_mem_region(tridentfb_fix.mmio_start, tridentfb_fix.mmio_len, "tridentfb")) { if (!request_mem_region(tridentfb_fix.mmio_start, tridentfb_fix.mmio_len, "tridentfb")) {
debug("request_region failed!\n"); debug("request_region failed!\n");
framebuffer_release(info);
return -1; return -1;
} }
...@@ -1299,8 +1300,6 @@ static int __devinit trident_pci_probe(struct pci_dev *dev, ...@@ -1299,8 +1300,6 @@ static int __devinit trident_pci_probe(struct pci_dev *dev,
goto out_unmap1; goto out_unmap1;
} }
enable_mmio();
/* setup framebuffer memory */ /* setup framebuffer memory */
tridentfb_fix.smem_start = pci_resource_start(dev, 0); tridentfb_fix.smem_start = pci_resource_start(dev, 0);
tridentfb_fix.smem_len = get_memsize(default_par); tridentfb_fix.smem_len = get_memsize(default_par);
...@@ -1312,6 +1311,8 @@ static int __devinit trident_pci_probe(struct pci_dev *dev, ...@@ -1312,6 +1311,8 @@ static int __devinit trident_pci_probe(struct pci_dev *dev,
goto out_unmap1; goto out_unmap1;
} }
enable_mmio();
info->screen_base = ioremap_nocache(tridentfb_fix.smem_start, info->screen_base = ioremap_nocache(tridentfb_fix.smem_start,
tridentfb_fix.smem_len); tridentfb_fix.smem_len);
......
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