From 1d9bfacd52ece918b7861e205202912231ca6166 Mon Sep 17 00:00:00 2001 From: Jiapeng Chong Date: Mon, 1 Mar 2021 18:46:02 +0800 Subject: esp4: Simplify the calculation of variables Fix the following coccicheck warnings: ./net/ipv4/esp4.c:757: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 --- net/ipv4/esp4.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'net/ipv4/esp4.c') diff --git a/net/ipv4/esp4.c b/net/ipv4/esp4.c index a3271ec3e162..804a7698df5b 100644 --- a/net/ipv4/esp4.c +++ b/net/ipv4/esp4.c @@ -754,7 +754,7 @@ int esp_input_done2(struct sk_buff *skb, int err) int hlen = sizeof(struct ip_esp_hdr) + crypto_aead_ivsize(aead); int ihl; - if (!xo || (xo && !(xo->flags & CRYPTO_DONE))) + if (!xo || !(xo->flags & CRYPTO_DONE)) kfree(ESP_SKB_CB(skb)->tmp); if (unlikely(err)) -- cgit v1.2.3