mirror of
https://github.com/fail0verflow/switch-linux.git
synced 2025-05-04 02:34:21 -04:00
ipv6: esp6: use BUG_ON instead of if condition followed by BUG
Use BUG_ON instead of if condition followed by BUG in esp_remove_trailer. This issue was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com> Acked-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
This commit is contained in:
parent
2fc5f83b92
commit
eee12df5a0
1 changed files with 2 additions and 2 deletions
|
@ -483,8 +483,8 @@ static inline int esp_remove_trailer(struct sk_buff *skb)
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (skb_copy_bits(skb, skb->len - alen - 2, nexthdr, 2))
|
ret = skb_copy_bits(skb, skb->len - alen - 2, nexthdr, 2);
|
||||||
BUG();
|
BUG_ON(ret);
|
||||||
|
|
||||||
ret = -EINVAL;
|
ret = -EINVAL;
|
||||||
padlen = nexthdr[0];
|
padlen = nexthdr[0];
|
||||||
|
|
Loading…
Add table
Reference in a new issue