]>
git.karo-electronics.de Git - karo-tx-linux.git/commit
staging: rtl8712: Restructure code for clarity
Invert if statements to be able to return immediately in case of error,
and to avoid additional else branch.
Improve layout of function since there is more horizontal space now.
This was found using the following Coccinelle script:
@disable neg_if@
expression e,E;
statement S;
@@
*if (e)
S
else { return -E; }
@disable neg_if@
expression e,E;
statement S;
identifier l;
@@
*if
(e)
S
else
{ rc = -E; goto l; }
Signed-off-by: Narcisa Ana Maria Vasile <narcisaanamaria12@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>