summaryrefslogtreecommitdiffstats
path: root/drivers/video/tridentfb.c
diff options
context:
space:
mode:
authorKrzysztof Helt <krzysztof.h1@wp.pl>2008-07-23 21:30:57 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2008-07-24 10:47:35 -0700
commit3876ae8beb2c7c19e21279b9603b1244fcd744dd (patch)
tree3c95eb22483464f1f77ab7bdbc92e02311c83906 /drivers/video/tridentfb.c
parent6bdf1035602abf0564d24a7447eea1c149c4bcb1 (diff)
downloadop-kernel-dev-3876ae8beb2c7c19e21279b9603b1244fcd744dd.zip
op-kernel-dev-3876ae8beb2c7c19e21279b9603b1244fcd744dd.tar.gz
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>
Diffstat (limited to 'drivers/video/tridentfb.c')
-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 8ee4261..e79788a 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,
if (!request_mem_region(tridentfb_fix.mmio_start, tridentfb_fix.mmio_len, "tridentfb")) {
debug("request_region failed!\n");
+ framebuffer_release(info);
return -1;
}
@@ -1299,8 +1300,6 @@ static int __devinit trident_pci_probe(struct pci_dev *dev,
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);
@@ -1312,6 +1311,8 @@ static int __devinit trident_pci_probe(struct pci_dev *dev,
goto out_unmap1;
}
+ enable_mmio();
+
info->screen_base = ioremap_nocache(tridentfb_fix.smem_start,
tridentfb_fix.smem_len);
OpenPOWER on IntegriCloud