summaryrefslogtreecommitdiff
path: root/drivers/tty/tty_ioctl.c
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2021-03-02 07:22:12 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-03-10 09:34:09 +0100
commitab78b0c9fa9dfc02f823aac9f8174d4ee0585057 (patch)
treed1480515d719976da3c081328ccae3a2459d2b6b /drivers/tty/tty_ioctl.c
parentb93db97e1ca08e500305bc46b08c72e2232c4be1 (diff)
tty: cleanup tty_chars_in_buffer
There is no need for 'else' when the 'if' part already returned. This makes tty_chars_in_buffer similar to tty_write_room too. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Link: https://lore.kernel.org/r/20210302062214.29627-42-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/tty_ioctl.c')
-rw-r--r--drivers/tty/tty_ioctl.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/tty/tty_ioctl.c b/drivers/tty/tty_ioctl.c
index 4de1c6ddb8ff..deffaefcf41d 100644
--- a/drivers/tty/tty_ioctl.c
+++ b/drivers/tty/tty_ioctl.c
@@ -57,8 +57,7 @@ int tty_chars_in_buffer(struct tty_struct *tty)
{
if (tty->ops->chars_in_buffer)
return tty->ops->chars_in_buffer(tty);
- else
- return 0;
+ return 0;
}
EXPORT_SYMBOL(tty_chars_in_buffer);