aboutsummaryrefslogtreecommitdiff
path: root/drivers/char/mxser.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-04-30 10:16:42 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2010-04-30 10:16:42 -0700
commit87156d692afdc4c689e99380a263445217a4b76c (patch)
tree918cd55f9338626c2d354cfe8b6a66e451fedf99 /drivers/char/mxser.c
parente4049eb8527668a6c7f97b944970b81d1316d5b0 (diff)
parentc61fae964a5ee04c4e4a01caecaf778c2e26e589 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6: serial: drivers/serial/pmac_zilog.c: add missing unlock serial: 8250_pnp - add Fujitsu Wacom device tty: Fix regressions in the char driver conversion
Diffstat (limited to 'drivers/char/mxser.c')
-rw-r--r--drivers/char/mxser.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/char/mxser.c b/drivers/char/mxser.c
index 47023053ee8..d2692d443f7 100644
--- a/drivers/char/mxser.c
+++ b/drivers/char/mxser.c
@@ -1011,6 +1011,7 @@ static int mxser_open(struct tty_struct *tty, struct file *filp)
if (!info->ioaddr)
return -ENODEV;
+ tty->driver_data = info;
return tty_port_open(&info->port, tty, filp);
}
@@ -1074,7 +1075,7 @@ static void mxser_close(struct tty_struct *tty, struct file *filp)
struct mxser_port *info = tty->driver_data;
struct tty_port *port = &info->port;
- if (tty->index == MXSER_PORTS)
+ if (tty->index == MXSER_PORTS || info == NULL)
return;
if (tty_port_close_start(port, tty, filp) == 0)
return;