Skip to content
Commit 09e1aa1a authored by Narcisa Ana Maria Vasile's avatar Narcisa Ana Maria Vasile Committed by Greg Kroah-Hartman
Browse files

staging: rtl8712: Invert the test on check_fwstate() to reduce indentation



Negate if condition to be able to return immediately in case of error,
and then continue with the rest of the function
without extra indentation level.

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: default avatarNarcisa Ana Maria Vasile <narcisaanamaria12@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent e6d93795
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment