提交 eee12df5 编写于 作者: G Gustavo A. R. Silva 提交者: Steffen Klassert

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: NGustavo A. R. Silva <garsilva@embeddedor.com>
Acked-by: NHerbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: NSteffen Klassert <steffen.klassert@secunet.com>
上级 2fc5f83b
...@@ -483,8 +483,8 @@ static inline int esp_remove_trailer(struct sk_buff *skb) ...@@ -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];
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册