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:
parent
2307f4a517
commit
dd016aca28
|
@ -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);
|
sk_msg_check_to_free(msg, i, msg->sg.size);
|
||||||
sge = sk_msg_elem(msg, i);
|
sge = sk_msg_elem(msg, i);
|
||||||
}
|
}
|
||||||
if (msg->skb)
|
consume_skb(msg->skb);
|
||||||
consume_skb(msg->skb);
|
|
||||||
sk_msg_init(msg);
|
sk_msg_init(msg);
|
||||||
return freed;
|
return freed;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue