aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/char/mxser_new.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/char/mxser_new.c b/drivers/char/mxser_new.c
index 042d1381ff6f..f078ddf48b79 100644
--- a/drivers/char/mxser_new.c
+++ b/drivers/char/mxser_new.c
@@ -2403,9 +2403,8 @@ static int __devinit mxser_initbrd(struct mxser_board *brd,
2403 brd->info->name, brd->irq); 2403 brd->info->name, brd->irq);
2404 /* We hold resources, we need to release them. */ 2404 /* We hold resources, we need to release them. */
2405 mxser_release_res(brd, pdev, 0); 2405 mxser_release_res(brd, pdev, 0);
2406 return retval;
2407 } 2406 }
2408 return 0; 2407 return retval;
2409} 2408}
2410 2409
2411static int __init mxser_get_ISA_conf(int cap, struct mxser_board *brd) 2410static int __init mxser_get_ISA_conf(int cap, struct mxser_board *brd)
@@ -2590,8 +2589,9 @@ static int __devinit mxser_probe(struct pci_dev *pdev,
2590 } 2589 }
2591 2590
2592 /* mxser_initbrd will hook ISR. */ 2591 /* mxser_initbrd will hook ISR. */
2593 if (mxser_initbrd(brd, pdev) < 0) 2592 retval = mxser_initbrd(brd, pdev);
2594 goto err_relvec; 2593 if (retval)
2594 goto err_null;
2595 2595
2596 for (i = 0; i < brd->info->nports; i++) 2596 for (i = 0; i < brd->info->nports; i++)
2597 tty_register_device(mxvar_sdriver, brd->idx + i, &pdev->dev); 2597 tty_register_device(mxvar_sdriver, brd->idx + i, &pdev->dev);
@@ -2599,10 +2599,9 @@ static int __devinit mxser_probe(struct pci_dev *pdev,
2599 pci_set_drvdata(pdev, brd); 2599 pci_set_drvdata(pdev, brd);
2600 2600
2601 return 0; 2601 return 0;
2602err_relvec:
2603 pci_release_region(pdev, 3);
2604err_relio: 2602err_relio:
2605 pci_release_region(pdev, 2); 2603 pci_release_region(pdev, 2);
2604err_null:
2606 brd->info = NULL; 2605 brd->info = NULL;
2607err: 2606err:
2608 return retval; 2607 return retval;
@@ -2620,6 +2619,7 @@ static void __devexit mxser_remove(struct pci_dev *pdev)
2620 tty_unregister_device(mxvar_sdriver, brd->idx + i); 2619 tty_unregister_device(mxvar_sdriver, brd->idx + i);
2621 2620
2622 mxser_release_res(brd, pdev, 1); 2621 mxser_release_res(brd, pdev, 1);
2622 brd->info = NULL;
2623} 2623}
2624 2624
2625static struct pci_driver mxser_driver = { 2625static struct pci_driver mxser_driver = {