diff options
-rw-r--r-- | drivers/video/cirrusfb.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/drivers/video/cirrusfb.c b/drivers/video/cirrusfb.c index daf43f535a0b..2c4bc6205738 100644 --- a/drivers/video/cirrusfb.c +++ b/drivers/video/cirrusfb.c | |||
@@ -2442,7 +2442,10 @@ static int cirrusfb_pci_register (struct pci_dev *pdev, | |||
2442 | printk ("Cirrus Logic chipset on PCI bus\n"); | 2442 | printk ("Cirrus Logic chipset on PCI bus\n"); |
2443 | pci_set_drvdata(pdev, info); | 2443 | pci_set_drvdata(pdev, info); |
2444 | 2444 | ||
2445 | return cirrusfb_register(cinfo); | 2445 | ret = cirrusfb_register(cinfo); |
2446 | if (ret) | ||
2447 | iounmap(cinfo->fbmem); | ||
2448 | return ret; | ||
2446 | 2449 | ||
2447 | err_release_legacy: | 2450 | err_release_legacy: |
2448 | if (release_io_ports) | 2451 | if (release_io_ports) |
@@ -2574,7 +2577,15 @@ static int cirrusfb_zorro_register(struct zorro_dev *z, | |||
2574 | printk (KERN_INFO "Cirrus Logic chipset on Zorro bus\n"); | 2577 | printk (KERN_INFO "Cirrus Logic chipset on Zorro bus\n"); |
2575 | zorro_set_drvdata(z, info); | 2578 | zorro_set_drvdata(z, info); |
2576 | 2579 | ||
2577 | return cirrusfb_register(cinfo); | 2580 | ret = cirrusfb_register(cinfo); |
2581 | if (ret) { | ||
2582 | if (btype == BT_PICASSO4) { | ||
2583 | iounmap(cinfo->fbmem); | ||
2584 | iounmap(cinfo->regbase - 0x600000); | ||
2585 | } else if (board_addr > 0x01000000) | ||
2586 | iounmap(cinfo->fbmem); | ||
2587 | } | ||
2588 | return ret; | ||
2578 | 2589 | ||
2579 | err_unmap_regbase: | 2590 | err_unmap_regbase: |
2580 | /* Parental advisory: explicit hack */ | 2591 | /* Parental advisory: explicit hack */ |