]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
[PATCH] Bluetooth: Check if DLC is still attached to the TTY
authorMarcel Holtmann <marcel@holtmann.org>
Mon, 16 Oct 2006 15:59:28 +0000 (15:59 +0000)
committerChris Wright <chrisw@sous-sol.org>
Sat, 4 Nov 2006 01:33:46 +0000 (17:33 -0800)
[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>
net/bluetooth/rfcomm/tty.c

index bd8d671a0ba6f1622ee54e463c2d393b0a6a8943..5d65cebda801c90f64e242be4fdcf33745a87579 100644 (file)
@@ -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");