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

Skip to content
Commit b8f1ab84 authored by Lei wang's avatar Lei wang Committed by Gerrit - the friendly Code Review server
Browse files

tty: serial_core: add tty NULL check to uart_tx_stopped



Commit 761ed4a94582 ("tty: serial_core: convert uart_close to use
tty_port_close") created a case where a port used for a console does not
get shutdown on tty closing. Then a call to uart_tx_stopped() segfaults
because the tty is NULL. This could be fixed to restore old behavior,
but we also want to allow tty_ports to work without a tty attached. So
this change to allow a NULL tty_struct is needed either way.

Fixes: 761ed4a94582
("tty: serial_core: convert uart_close to use tty_port_close")
Reported-by: default avatarkernel test robot <xiaolong.ye@intel.com>
Signed-off-by: default avatarRob Herring <robh@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>

Change-Id: Ifbeeacc89d396b857332ce94cc2d77bdd6e12bb7
Git-repo: git://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git


Git-commit: a727b025f43d7952c0697562f5cecda9f42758aa
Signed-off-by: default avatarLei wang <leiwan@codeaurora.org>
parent cb8f9c4d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment