diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2007-01-25 19:35:01 +0100 |
---|---|---|
committer | Adrian Bunk <bunk@stusta.de> | 2007-01-25 19:35:01 +0100 |
commit | cf4aeafe86d3cba8c96e0c093196ea3309a126f0 (patch) | |
tree | f90d1588a2c47fe31c2535bc69deadb1cfdad2aa | |
parent | 1987ad05d5aaadd104dfe66b2caee35dc83b0b6f (diff) |
[Bluetooth] Check if DLC is still attached to the TTY
If the DLC device is no longer attached to the TTY device, then it
makes no sense to go through with changing the termios settings.
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
-rw-r--r-- | net/bluetooth/rfcomm/tty.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/bluetooth/rfcomm/tty.c b/net/bluetooth/rfcomm/tty.c index 74368f79ee5..1b83b2ccd04 100644 --- a/net/bluetooth/rfcomm/tty.c +++ b/net/bluetooth/rfcomm/tty.c @@ -754,6 +754,9 @@ static void rfcomm_tty_set_termios(struct tty_struct *tty, struct termios *old) BT_DBG("tty %p termios %p", tty, old); + if (!dev) + return; + /* Handle turning off CRTSCTS */ if ((old->c_cflag & CRTSCTS) && !(new->c_cflag & CRTSCTS)) BT_DBG("Turning off CRTSCTS unsupported"); |