projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b93db97
)
tty: cleanup tty_chars_in_buffer
author
Jiri Slaby
<jslaby@suse.cz>
Tue, 2 Mar 2021 06:22:12 +0000
(07:22 +0100)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Wed, 10 Mar 2021 08:34:09 +0000
(09:34 +0100)
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>
drivers/tty/tty_ioctl.c
patch
|
blob
|
history
diff --git
a/drivers/tty/tty_ioctl.c
b/drivers/tty/tty_ioctl.c
index 4de1c6ddb8ffb24a428f22c1fc133b71763f8f5c..deffaefcf41d661d3297036cd5e417b171ed287d 100644
(file)
--- 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);