From b754f1bb053d9ec2d9b9fb64126543e9b8cbd3dd Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Mon, 16 Oct 2006 15:59:28 +0000 Subject: [PATCH] [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 Signed-off-by: Greg Kroah-Hartman Signed-off-by: Chris Wright --- net/bluetooth/rfcomm/tty.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/bluetooth/rfcomm/tty.c b/net/bluetooth/rfcomm/tty.c index bd8d671a0ba6f..5d65cebda801c 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"); -- 2.47.2