• Tobin C. Harding's avatar
    staging: ks7010: move skb null check near allocation · 8cd1dbe1
    Tobin C. Harding authored
    Currently, after allocating an sk_buff, driver fills the sk_buff
    within code block guarded by a NULL check on the sk_buff. If a NULL
    check is done immediately after the allocation, and code returns on
    error, then the subsequent code need not be guarded and the level of
    indentation may be reduced. This aids the readability of the code and
    makes explicit the error path.
    
    Check for NULL directly after allocating the sk_buff, return if
    allocation fails. Reduce indentation of subsequent code. Do not change
    the program logic.
    Signed-off-by: default avatarTobin C. Harding <me@tobin.cc>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    8cd1dbe1
ks_hostif.c 75.8 KB