diff options
author | Markus Elfring <elfring@users.sourceforge.net> | 2019-08-22 18:00:40 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-08-24 16:24:53 -0700 |
commit | dd016aca28f67603f32c4e666805db519df2120a (patch) | |
tree | fd5f084abec72b33b85ab7315436944b09e586c7 /net/core/skmsg.c | |
parent | 2307f4a517c7dbb26fe0c0513ee0ba9d3239362f (diff) |
net/core/skmsg: Delete an unnecessary check before the function call “consume_skb”
The consume_skb() function performs also input parameter validation.
Thus the test around the call is not needed.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Acked-by: Song Liu <songliubraving@fb.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/skmsg.c')
-rw-r--r-- | net/core/skmsg.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/core/skmsg.c b/net/core/skmsg.c index 6832eeb4b785..cf390e0aa73d 100644 --- a/net/core/skmsg.c +++ b/net/core/skmsg.c @@ -190,8 +190,7 @@ static int __sk_msg_free(struct sock *sk, struct sk_msg *msg, u32 i, sk_msg_check_to_free(msg, i, msg->sg.size); sge = sk_msg_elem(msg, i); } - if (msg->skb) - consume_skb(msg->skb); + consume_skb(msg->skb); sk_msg_init(msg); return freed; } |