Skip to content

Commit

Permalink
[Bluetooth] Check if RFCOMM session is still attached to the TTY
Browse files Browse the repository at this point in the history
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 <marcel@holtmann.org>
  • Loading branch information
Marcel Holtmann authored and David S. Miller committed Nov 22, 2006
1 parent 6bd5741 commit ff2d367
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/bluetooth/rfcomm/tty.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit ff2d367

Please sign in to comment.