From: Al Viro Date: Sun, 27 Apr 2008 05:28:58 +0000 (-0700) Subject: ipv6: result of csum_fold() is already 16bit, no need to cast X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ec6b486fa9f6d20bfbaebba1db88bfe9d390ab1a;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git ipv6: result of csum_fold() is already 16bit, no need to cast Signed-off-by: Al Viro Signed-off-by: David S. Miller --- diff --git a/net/ipv6/ip6mr.c b/net/ipv6/ip6mr.c index c8c6e33d1163..2de3c464fe75 100644 --- a/net/ipv6/ip6mr.c +++ b/net/ipv6/ip6mr.c @@ -358,7 +358,7 @@ static int pim6_rcv(struct sk_buff *skb) if (pim->type != ((PIM_VERSION << 4) | PIM_REGISTER) || (pim->flags & PIM_NULL_REGISTER) || (ip_compute_csum((void *)pim, sizeof(*pim)) != 0 && - (u16)csum_fold(skb_checksum(skb, 0, skb->len, 0)))) + csum_fold(skb_checksum(skb, 0, skb->len, 0)))) goto drop; /* check if the inner packet is destined to mcast group */