From: Jiapeng Chong Date: Wed, 3 Feb 2021 02:44:30 +0000 (+0800) Subject: esp: Simplify the calculation of variables X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=bf3da527bbc9f0a83a02f4ad3fb762eafdd63ba0;p=linux.git esp: Simplify the calculation of variables Fix the following coccicheck warnings: ./net/ipv6/esp6.c:791:16-18: WARNING !A || A && B is equivalent to !A || B. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Steffen Klassert --- diff --git a/net/ipv6/esp6.c b/net/ipv6/esp6.c index 52c2f063529fb..53eb76b1e7086 100644 --- a/net/ipv6/esp6.c +++ b/net/ipv6/esp6.c @@ -793,7 +793,7 @@ int esp6_input_done2(struct sk_buff *skb, int err) int hlen = sizeof(struct ip_esp_hdr) + crypto_aead_ivsize(aead); int hdr_len = skb_network_header_len(skb); - if (!xo || (xo && !(xo->flags & CRYPTO_DONE))) + if (!xo || !(xo->flags & CRYPTO_DONE)) kfree(ESP_SKB_CB(skb)->tmp); if (unlikely(err))