Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3eca5299 authored by Tommie Gannert's avatar Tommie Gannert Committed by David S. Miller
Browse files

irtty-sir.c: Do not set_termios() on irtty_close()



Issuing set_termios() from irtty_close() causes kernel Oops for
unplugged usb-serial devices.

Since no other tty_ldisc calls set_termios() on close and no tty driver
seem to check if tty->device_data is NULL or not on entry to set_termios(),
the only solution I can come up with is to remove the irtty_stop_receiver()
call, which only updates termios.

Signed-off-by: default avatarTommie Gannert <tommie@gannert.se>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 163c8ff3
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -522,7 +522,6 @@ static void irtty_close(struct tty_struct *tty)
	sirdev_put_instance(priv->dev);

	/* Stop tty */
	irtty_stop_receiver(tty, TRUE);
	clear_bit(TTY_DO_WRITE_WAKEUP, &tty->flags);
	if (tty->ops->stop)
		tty->ops->stop(tty);