aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
authorJonathan Corbet <corbet@lwn.net>2010-03-26 17:45:39 -0400
committerJonathan Corbet <corbet@lwn.net>2010-04-20 16:23:18 -0400
commit1b1f8cd299d3c5a90c2ec1c24c271a0b536e5891 (patch)
tree201d87dfb84587e9c19f1eac2157185e395fb578 /drivers/video
parentb72a5070c74f5ca9a45a03c2d625daab66d0a820 (diff)
viafb: Unmap the frame buffer on initialization error
This was part of Harald's "make viafb a first-class citizen using pci_driver" patch, but somehow got dropped when that patch went into mainline. Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Cc: ScottFang@viatech.com.cn Cc: JosephChan@via.com.tw Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/via/viafbdev.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/video/via/viafbdev.c b/drivers/video/via/viafbdev.c
index 8af405bf077b..8955ab4caac8 100644
--- a/drivers/video/via/viafbdev.c
+++ b/drivers/video/via/viafbdev.c
@@ -1870,7 +1870,7 @@ static int __devinit via_pci_probe(struct pci_dev *pdev,
1870 printk(KERN_ERR 1870 printk(KERN_ERR
1871 "allocate the second framebuffer struct error\n"); 1871 "allocate the second framebuffer struct error\n");
1872 rc = -ENOMEM; 1872 rc = -ENOMEM;
1873 goto out_delete_i2c; 1873 goto out_unmap_screen;
1874 } 1874 }
1875 viaparinfo1 = viafbinfo1->par; 1875 viaparinfo1 = viafbinfo1->par;
1876 memcpy(viaparinfo1, viaparinfo, viafb_par_length); 1876 memcpy(viaparinfo1, viaparinfo, viafb_par_length);
@@ -1961,6 +1961,8 @@ out_dealloc_cmap:
1961out_fb1_release: 1961out_fb1_release:
1962 if (viafbinfo1) 1962 if (viafbinfo1)
1963 framebuffer_release(viafbinfo1); 1963 framebuffer_release(viafbinfo1);
1964out_unmap_screen:
1965 iounmap(viafbinfo->screen_base);
1964out_delete_i2c: 1966out_delete_i2c:
1965 viafb_delete_i2c_buss(viaparinfo); 1967 viafb_delete_i2c_buss(viaparinfo);
1966out_fb_release: 1968out_fb_release: