summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiapeng Zhong <abaci-bugfix@linux.alibaba.com>2021-01-25 09:41:46 +0300
committerSteffen Klassert <steffen.klassert@secunet.com>2021-01-27 13:49:55 +0300
commit0c87b1ac604518a0d3f527080c6883d5c2402fb4 (patch)
tree0e002bd1f9036dcc1d985ab51b8af17f553d6804
parent18f976960bca0c32c5a072a2e003a99c156268bc (diff)
downloadlinux-0c87b1ac604518a0d3f527080c6883d5c2402fb4.tar.xz
net: Simplify the calculation of variables
Fix the following coccicheck warnings: ./net/ipv4/esp4_offload.c:288:32-34: WARNING !A || A && B is equivalent to !A || B. Reported-by: Abaci Robot <abaci@linux.alibaba.com> Signed-off-by: Jiapeng Zhong <abaci-bugfix@linux.alibaba.com> Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
-rw-r--r--net/ipv4/esp4_offload.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/esp4_offload.c b/net/ipv4/esp4_offload.c
index 5bda5aeda579..601f5fbfc63f 100644
--- a/net/ipv4/esp4_offload.c
+++ b/net/ipv4/esp4_offload.c
@@ -285,7 +285,7 @@ static int esp_xmit(struct xfrm_state *x, struct sk_buff *skb, netdev_features_
esp.esph = ip_esp_hdr(skb);
- if (!hw_offload || (hw_offload && !skb_is_gso(skb))) {
+ if (!hw_offload || !skb_is_gso(skb)) {
esp.nfrags = esp_output_head(x, skb, &esp);
if (esp.nfrags < 0)
return esp.nfrags;