summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2006-10-16 15:59:28 +0000
committerChris Wright <chrisw@sous-sol.org>2006-11-03 17:33:46 -0800
commitb754f1bb053d9ec2d9b9fb64126543e9b8cbd3dd (patch)
treecea06ad47dc8e24d9e1703825c7f83bed4a32ffc
parent4d496dde1429e99c49070190cb4ec1f3c3effbdd (diff)
[PATCH] Bluetooth: Check if DLC is still attached to the TTY
[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: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Chris Wright <chrisw@sous-sol.org>
-rw-r--r--net/bluetooth/rfcomm/tty.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/bluetooth/rfcomm/tty.c b/net/bluetooth/rfcomm/tty.c
index bd8d671a0ba6..5d65cebda801 100644
--- a/net/bluetooth/rfcomm/tty.c
+++ b/net/bluetooth/rfcomm/tty.c
@@ -748,6 +748,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");