@@ -1436,7 +1436,7 @@ static int trident_pci_probe(struct pci_dev *dev,
if (!default_par->io_virt) {
debug("ioremap failed\n");
err = -1;
- goto out_unmap1;
+ goto release_memory_region_mmio;
}
enable_mmio(default_par);
@@ -1459,7 +1459,7 @@ static int trident_pci_probe(struct pci_dev *dev,
if (!info->screen_base) {
debug("ioremap failed\n");
err = -1;
- goto out_unmap2;
+ goto release_memory_region_smem;
}
default_par->flatpanel = is_flatpanel(default_par);
@@ -1485,7 +1485,7 @@ static int trident_pci_probe(struct pci_dev *dev,
info->pixmap.addr = kmalloc(4096, GFP_KERNEL);
if (!info->pixmap.addr) {
err = -ENOMEM;
- goto out_unmap2;
+ goto io_unmap_screenbase;
}
info->pixmap.size = 4096;
@@ -1531,11 +1531,14 @@ static int trident_pci_probe(struct pci_dev *dev,
out_unmap2:
kfree(info->pixmap.addr);
+io_unmap_screenbase:
iounmap(info->screen_base);
+release_memory_region_smem:
release_mem_region(tridentfb_fix.smem_start, tridentfb_fix.smem_len);
disable_mmio(info->par);
out_unmap1:
iounmap(default_par->io_virt);
+release_memory_region_mmio:
release_mem_region(tridentfb_fix.mmio_start, tridentfb_fix.mmio_len);
framebuffer_release(info);
return err;