From: Jiri Slaby Date: Tue, 2 Mar 2021 06:21:49 +0000 (+0100) Subject: tty: con3215, remove unneeded tty checks X-Git-Tag: v5.13-rc1~172^2~168 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=56e9d0f95ad0118750b67af8fbf2920a6f930faf;p=thirdparty%2Fkernel%2Fstable.git tty: con3215, remove unneeded tty checks There is no need to check tty in these functions as it's always non-NULL. So remove the tests. Cc: Martin Schwidefsky Cc: Heiko Carstens Cc: linux390@de.ibm.com Cc: linux-s390@vger.kernel.org Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210302062214.29627-19-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/s390/char/con3215.c b/drivers/s390/char/con3215.c index 5923a1f133ef7..ae0dd9c1595ce 100644 --- a/drivers/s390/char/con3215.c +++ b/drivers/s390/char/con3215.c @@ -948,8 +948,6 @@ static int tty3215_write(struct tty_struct * tty, struct raw3215_info *raw; int i, written; - if (!tty) - return 0; raw = (struct raw3215_info *) tty->driver_data; written = count; while (count > 0) { @@ -975,8 +973,6 @@ static int tty3215_put_char(struct tty_struct *tty, unsigned char ch) { struct raw3215_info *raw; - if (!tty) - return 0; raw = (struct raw3215_info *) tty->driver_data; raw3215_putchar(raw, ch); return 1;