Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 8cd1dbe1 authored by Tobin C. Harding's avatar Tobin C. Harding Committed by Greg Kroah-Hartman
Browse files

staging: ks7010: move skb null check near allocation



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>
parent 69f3fecc
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment