Skip to contentSkip to conversation

esp6: remove a duplicative condition

PATCH Applied angkery 2 participants 2 messages Mar 11, 2021 – Mar 15, 2021

Subsystems (3)
lore
Share & tools
lore

angkery

author
#0 lore raw

PATCH 1/1 esp6: remove a duplicative condition

From: Junlin Yang <[email protected]>

Fixes coccicheck warnings:
./net/ipv6/esp6_offload.c:319:32-34:
WARNING !A || A && B is equivalent to !A || B

---
 net/ipv6/esp6_offload.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/ipv6/esp6_offload.c +1 -1
index 1ca516f..631c168 100644
@@ -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;
Signature · 1 line
1.9.1