aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKrzysztof Helt <krzysztof.h1@wp.pl>2008-07-24 00:30:57 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-07-24 13:47:35 -0400
commit3876ae8beb2c7c19e21279b9603b1244fcd744dd (patch)
tree3c95eb22483464f1f77ab7bdbc92e02311c83906
parent6bdf1035602abf0564d24a7447eea1c149c4bcb1 (diff)
tridentfb: improve probe function
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>
-rw-r--r--drivers/video/tridentfb.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/video/tridentfb.c b/drivers/video/tridentfb.c
index 8ee4261abf3b..e79788a778fe 100644
--- a/drivers/video/tridentfb.c
+++ b/drivers/video/tridentfb.c
@@ -1287,6 +1287,7 @@ static int __devinit trident_pci_probe(struct pci_dev *dev,
1287 1287
1288 if (!request_mem_region(tridentfb_fix.mmio_start, tridentfb_fix.mmio_len, "tridentfb")) { 1288 if (!request_mem_region(tridentfb_fix.mmio_start, tridentfb_fix.mmio_len, "tridentfb")) {
1289 debug("request_region failed!\n"); 1289 debug("request_region failed!\n");
1290 framebuffer_release(info);
1290 return -1; 1291 return -1;
1291 } 1292 }
1292 1293
@@ -1299,8 +1300,6 @@ static int __devinit trident_pci_probe(struct pci_dev *dev,
1299 goto out_unmap1; 1300 goto out_unmap1;
1300 } 1301 }
1301 1302
1302 enable_mmio();
1303
1304 /* setup framebuffer memory */ 1303 /* setup framebuffer memory */
1305 tridentfb_fix.smem_start = pci_resource_start(dev, 0); 1304 tridentfb_fix.smem_start = pci_resource_start(dev, 0);
1306 tridentfb_fix.smem_len = get_memsize(default_par); 1305 tridentfb_fix.smem_len = get_memsize(default_par);
@@ -1312,6 +1311,8 @@ static int __devinit trident_pci_probe(struct pci_dev *dev,
1312 goto out_unmap1; 1311 goto out_unmap1;
1313 } 1312 }
1314 1313
1314 enable_mmio();
1315
1315 info->screen_base = ioremap_nocache(tridentfb_fix.smem_start, 1316 info->screen_base = ioremap_nocache(tridentfb_fix.smem_start,
1316 tridentfb_fix.smem_len); 1317 tridentfb_fix.smem_len);
1317 1318