tty: vt, get rid of weird source code flow
authorJiri Slaby <jslaby@suse.cz>
Thu, 31 Mar 2016 08:08:15 +0000 (10:08 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 30 Apr 2016 16:26:55 +0000 (09:26 -0700)
commit34902b7f2754e6d890feb0cee34187f1bc75c930
tree57f20ae6830560db472bc40df37baf404b377b7f
parent182846a00f489849c55d113954f0c4a8a286ca39
tty: vt, get rid of weird source code flow

Some code in vc_allocate is indented by 4 spaces. It is inside a
condition. Invert the condition and move the code to the first
indentation level (using \tab). And insert some empty lines to have
logical code blocks separated.

Then, instead of freeing in an 'if' false branch, use goto-error
label as fail path.

Maybe better to look at this patch with diff -w -b.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/vt/vt.c