Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 235992
b: refs/heads/master
c: 5c0ef2a
h: refs/heads/master
v: v3
  • Loading branch information
Aaro Koskinen authored and Greg Kroah-Hartman committed Feb 18, 2011
1 parent 3c69f21 commit 769d55e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d80aaa01aec2d9b5e833fb9a26b83784e106a379
refs/heads/master: 5c0ef2ac365ced91b819917e56dcd6795b5bef5a
17 changes: 14 additions & 3 deletions trunk/drivers/staging/xgifb/XGI_main_26.c
Original file line number Diff line number Diff line change
Expand Up @@ -3103,9 +3103,8 @@ static int __devinit xgifb_probe(struct pci_dev *pdev,

if (!request_mem_region(xgi_video_info.mmio_base, XGIfb_mmio_size, "XGIfb MMIO")) {
printk(KERN_ERR "XGIfb: Fatal error: Unable to reserve MMIO region\n");
release_mem_region(xgi_video_info.video_base, xgi_video_info.video_size);
ret = -ENODEV;
goto error;
goto error_0;
}

xgi_video_info.video_vbase = XGIhw_ext.pjVideoMemoryAddress =
Expand Down Expand Up @@ -3394,7 +3393,7 @@ static int __devinit xgifb_probe(struct pci_dev *pdev,

if (register_framebuffer(fb_info) < 0) {
ret = -EINVAL;
goto error;
goto error_1;
}

XGIfb_registered = 1;
Expand All @@ -3408,6 +3407,13 @@ static int __devinit xgifb_probe(struct pci_dev *pdev,

return 0;

error_1:
iounmap(xgi_video_info.mmio_vbase);
iounmap(xgi_video_info.video_vbase);
release_mem_region(xgi_video_info.mmio_base, XGIfb_mmio_size);
error_0:
release_mem_region(xgi_video_info.video_base,
xgi_video_info.video_size);
error:
vfree(XGIhw_ext.pjVirtualRomBase);
vfree(XGIhw_ext.pSR);
Expand All @@ -3425,6 +3431,11 @@ static void __devexit xgifb_remove(struct pci_dev *pdev)
/* Unregister the framebuffer */
/* if (xgi_video_info.registered) { */
unregister_framebuffer(fb_info);
iounmap(xgi_video_info.mmio_vbase);
iounmap(xgi_video_info.video_vbase);
release_mem_region(xgi_video_info.mmio_base, XGIfb_mmio_size);
release_mem_region(xgi_video_info.video_base,
xgi_video_info.video_size);
vfree(XGIhw_ext.pjVirtualRomBase);
framebuffer_release(fb_info);
/* } */
Expand Down

0 comments on commit 769d55e

Please sign in to comment.