diff options
Diffstat (limited to 'drivers/char')
-rw-r--r-- | drivers/char/mxser.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/char/mxser.c b/drivers/char/mxser.c index d5c34af8752..3b965a651da 100644 --- a/drivers/char/mxser.c +++ b/drivers/char/mxser.c @@ -917,6 +917,9 @@ static int mxser_open(struct tty_struct *tty, struct file *filp) struct mxser_struct *info; int retval, line; + /* initialize driver_data in case something fails */ + tty->driver_data = NULL; + line = tty->index; if (line == MXSER_PORTS) return 0; @@ -979,7 +982,7 @@ static void mxser_close(struct tty_struct *tty, struct file *filp) if (tty->index == MXSER_PORTS) return; if (!info) - BUG(); + return; spin_lock_irqsave(&info->slock, flags); |