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>
This commit is contained in:
Markus Elfring 2019-08-22 18:00:40 +02:00 committed by David S. Miller
parent 2307f4a517
commit dd016aca28
1 changed files with 1 additions and 2 deletions

View File

@ -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;
}