]> git.baikalelectronics.ru Git - kernel.git/commit
n_hdlc: invert conditions in n_hdlc_tty_close and n_hdlc_tty_poll
authorJiri Slaby <jslaby@suse.cz>
Wed, 19 Feb 2020 08:41:02 +0000 (09:41 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 21 Feb 2020 09:24:33 +0000 (10:24 +0100)
commit7b93304440fbbe0c331e230ed68745bac47a74cf
tree64d988d9b020e248c50997db7ea91ff0a94bcd9f
parent0306098ce8efbd9ae53b170f39bd52950a9e6bc2
n_hdlc: invert conditions in n_hdlc_tty_close and n_hdlc_tty_poll

This makes the functions return immediatelly on invalid state. And we
can push the indent of the later code one level left.

Pass "-w" to "git show" to see we are changing only the conditions (and
whitespace).

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Link: https://lore.kernel.org/r/20200219084118.26491-8-jslaby@suse.cz
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/n_hdlc.c