提交 ab78b0c9 编写于 作者: J Jiri Slaby 提交者: Greg Kroah-Hartman

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: NJiri Slaby <jslaby@suse.cz>
Link: https://lore.kernel.org/r/20210302062214.29627-42-jslaby@suse.czSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 b93db97e
...@@ -57,8 +57,7 @@ int tty_chars_in_buffer(struct tty_struct *tty) ...@@ -57,8 +57,7 @@ int tty_chars_in_buffer(struct tty_struct *tty)
{ {
if (tty->ops->chars_in_buffer) if (tty->ops->chars_in_buffer)
return tty->ops->chars_in_buffer(tty); return tty->ops->chars_in_buffer(tty);
else return 0;
return 0;
} }
EXPORT_SYMBOL(tty_chars_in_buffer); EXPORT_SYMBOL(tty_chars_in_buffer);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册