]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
esp6: remove a duplicative condition
authorJunlin Yang <yangjunlin@yulong.com>
Thu, 11 Mar 2021 02:07:56 +0000 (10:07 +0800)
committerSteffen Klassert <steffen.klassert@secunet.com>
Fri, 12 Mar 2021 08:56:43 +0000 (09:56 +0100)
Fixes coccicheck warnings:
./net/ipv6/esp6_offload.c:319:32-34:
WARNING !A || A && B is equivalent to !A || B

Signed-off-by: Junlin Yang <yangjunlin@yulong.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
net/ipv6/esp6_offload.c

index 1ca516fb30e1c29f29c94e90351587ab33b43323..631c168774f502c7a5c3c516f8636256bce2f8d0 100644 (file)
@@ -316,7 +316,7 @@ static int esp6_xmit(struct xfrm_state *x, struct sk_buff *skb,  netdev_features
        esp.plen = esp.clen - skb->len - esp.tfclen;
        esp.tailen = esp.tfclen + esp.plen + alen;
 
-       if (!hw_offload || (hw_offload && !skb_is_gso(skb))) {
+       if (!hw_offload || !skb_is_gso(skb)) {
                esp.nfrags = esp6_output_head(x, skb, &esp);
                if (esp.nfrags < 0)
                        return esp.nfrags;