From: Marcel Holtmann Date: Sat, 18 Nov 2006 21:14:42 +0000 (+0100) Subject: [Bluetooth] Check if RFCOMM session is still attached to the TTY X-Git-Tag: v2.6.19~56^2~9 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=ff2d367ac33b9278c9516ac1888207dac11d10b0;p=linux-2.6-omap-h63xx.git [Bluetooth] Check if RFCOMM session is still attached to the TTY If the RFCOMM session 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 --- diff --git a/net/bluetooth/rfcomm/tty.c b/net/bluetooth/rfcomm/tty.c index b8e3a5f1c8a..1fb5d42f37a 100644 --- a/net/bluetooth/rfcomm/tty.c +++ b/net/bluetooth/rfcomm/tty.c @@ -765,7 +765,7 @@ static void rfcomm_tty_set_termios(struct tty_struct *tty, struct termios *old) BT_DBG("tty %p termios %p", tty, old); - if (!dev) + if (!dev || !dev->dlc || !dev->dlc->session) return; /* Handle turning off CRTSCTS */