summaryrefslogtreecommitdiff
path: root/drivers/tty/tty_io.c
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2021-11-18 08:19:09 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-11-25 18:31:32 +0100
commit8cb28417dd2ce46938fea9aca9f56fb1f7b1934a (patch)
treef71d61bc7bff3f783715a460c77bbe01df7e18d1 /drivers/tty/tty_io.c
parent463d4c74bffd7209914bf1eefb6d2fa991422863 (diff)
tty: remove tty NULL check from __do_SAK()
Both do_SAK_work() and vc_SAK() provide a valid tty to __do_SAK(), so remove the check. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Link: https://lore.kernel.org/r/20211118071911.12059-3-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/tty_io.c')
-rw-r--r--drivers/tty/tty_io.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c
index 829944dfaf48..8e653bb4d7c7 100644
--- a/drivers/tty/tty_io.c
+++ b/drivers/tty/tty_io.c
@@ -3033,9 +3033,6 @@ void __do_SAK(struct tty_struct *tty)
int i;
unsigned long flags;
- if (!tty)
- return;
-
spin_lock_irqsave(&tty->ctrl.lock, flags);
session = get_pid(tty->ctrl.session);
spin_unlock_irqrestore(&tty->ctrl.lock, flags);