diff mbox series

[1/1] net: ipv4: use BUG_ON instead of condition followed by BUG

Message ID 1510543145-111658-1-git-send-email-jianjian.wang1@gmail.com
State Deferred, archived
Delegated to: David Miller
Headers show
Series [1/1] net: ipv4: use BUG_ON instead of condition followed by BUG | expand

Commit Message

Wang Jian Nov. 13, 2017, 3:19 a.m. UTC
Signed-off-by: Jian Wang <jianjian.wang1@gmail.com>
---
 net/ipv4/ip_output.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c
index e8e675b..1a53553 100644
--- a/net/ipv4/ip_output.c
+++ b/net/ipv4/ip_output.c
@@ -769,8 +769,8 @@  int ip_do_fragment(struct net *net, struct sock *sk, struct sk_buff *skb,
 		/*
 		 *	Copy a block of the IP datagram.
 		 */
-		if (skb_copy_bits(skb, ptr, skb_transport_header(skb2), len))
-			BUG();
+		BUG_ON(skb_copy_bits(skb, ptr, skb_transport_header(skb2), len));
+
 		left -= len;
 
 		/*