Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 39747
b: refs/heads/master
c: dabad05
h: refs/heads/master
i:
  39745: 7aec31d
  39743: 7224036
v: v3
  • Loading branch information
Akinobu Mita authored and Linus Torvalds committed Oct 17, 2006
1 parent 153cb03 commit 1c9fa90
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 10 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: ea6f94dfe9db4d19a39e774cfafa5c9428a9fdbc
refs/heads/master: dabad0568a5935e9f4903f5fd1d8f22b1c7c88c7
32 changes: 23 additions & 9 deletions trunk/drivers/char/epca.c
Original file line number Diff line number Diff line change
Expand Up @@ -1157,20 +1157,19 @@ static int __init pc_init(void)
int crd;
struct board_info *bd;
unsigned char board_id = 0;
int err = -ENOMEM;

int pci_boards_found, pci_count;

pci_count = 0;

pc_driver = alloc_tty_driver(MAX_ALLOC);
if (!pc_driver)
return -ENOMEM;
goto out1;

pc_info = alloc_tty_driver(MAX_ALLOC);
if (!pc_info) {
put_tty_driver(pc_driver);
return -ENOMEM;
}
if (!pc_info)
goto out2;

/* -----------------------------------------------------------------------
If epca_setup has not been ran by LILO set num_cards to defaults; copy
Expand Down Expand Up @@ -1370,11 +1369,17 @@ static int __init pc_init(void)

} /* End for each card */

if (tty_register_driver(pc_driver))
panic("Couldn't register Digi PC/ driver");
err = tty_register_driver(pc_driver);
if (err) {
printk(KERN_ERR "Couldn't register Digi PC/ driver");
goto out3;
}

if (tty_register_driver(pc_info))
panic("Couldn't register Digi PC/ info ");
err = tty_register_driver(pc_info);
if (err) {
printk(KERN_ERR "Couldn't register Digi PC/ info ");
goto out4;
}

/* -------------------------------------------------------------------
Start up the poller to check for events on all enabled boards
Expand All @@ -1385,6 +1390,15 @@ static int __init pc_init(void)
mod_timer(&epca_timer, jiffies + HZ/25);
return 0;

out4:
tty_unregister_driver(pc_driver);
out3:
put_tty_driver(pc_info);
out2:
put_tty_driver(pc_driver);
out1:
return err;

} /* End pc_init */

/* ------------------ Begin post_fep_init ---------------------- */
Expand Down

0 comments on commit 1c9fa90

Please sign in to comment.