]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
[Bluetooth] Check if DLC is still attached to the TTY
authorMarcel Holtmann <marcel@holtmann.org>
Thu, 25 Jan 2007 18:35:01 +0000 (19:35 +0100)
committerAdrian Bunk <bunk@stusta.de>
Thu, 25 Jan 2007 18:35:01 +0000 (19:35 +0100)
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>
net/bluetooth/rfcomm/tty.c

index 74368f79ee5d084e0645c6af221062567f475e47..1b83b2ccd0459af09b121d7325a281951ae0a71f 100644 (file)
@@ -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");