aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/video/igafb.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/video/igafb.c b/drivers/video/igafb.c
index b87ea21d3d78..3a81060137a2 100644
--- a/drivers/video/igafb.c
+++ b/drivers/video/igafb.c
@@ -400,6 +400,7 @@ int __init igafb_init(void)
400 info = kzalloc(size, GFP_ATOMIC); 400 info = kzalloc(size, GFP_ATOMIC);
401 if (!info) { 401 if (!info) {
402 printk("igafb_init: can't alloc fb_info\n"); 402 printk("igafb_init: can't alloc fb_info\n");
403 pci_dev_put(pdev);
403 return -ENOMEM; 404 return -ENOMEM;
404 } 405 }
405 406
@@ -409,12 +410,14 @@ int __init igafb_init(void)
409 if ((addr = pdev->resource[0].start) == 0) { 410 if ((addr = pdev->resource[0].start) == 0) {
410 printk("igafb_init: no memory start\n"); 411 printk("igafb_init: no memory start\n");
411 kfree(info); 412 kfree(info);
413 pci_dev_put(pdev);
412 return -ENXIO; 414 return -ENXIO;
413 } 415 }
414 416
415 if ((info->screen_base = ioremap(addr, 1024*1024*2)) == 0) { 417 if ((info->screen_base = ioremap(addr, 1024*1024*2)) == 0) {
416 printk("igafb_init: can't remap %lx[2M]\n", addr); 418 printk("igafb_init: can't remap %lx[2M]\n", addr);
417 kfree(info); 419 kfree(info);
420 pci_dev_put(pdev);
418 return -ENXIO; 421 return -ENXIO;
419 } 422 }
420 423
@@ -449,6 +452,7 @@ int __init igafb_init(void)
449 printk("igafb_init: can't remap %lx[4K]\n", igafb_fix.mmio_start); 452 printk("igafb_init: can't remap %lx[4K]\n", igafb_fix.mmio_start);
450 iounmap((void *)info->screen_base); 453 iounmap((void *)info->screen_base);
451 kfree(info); 454 kfree(info);
455 pci_dev_put(pdev);
452 return -ENXIO; 456 return -ENXIO;
453 } 457 }
454 458
@@ -466,6 +470,7 @@ int __init igafb_init(void)
466 iounmap((void *)par->io_base); 470 iounmap((void *)par->io_base);
467 iounmap(info->screen_base); 471 iounmap(info->screen_base);
468 kfree(info); 472 kfree(info);
473 pci_dev_put(pdev);
469 return -ENOMEM; 474 return -ENOMEM;
470 } 475 }
471 476