فهرست منبع

dcbnl: Use BUG_ON() instead of BUG()

Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Thomas Graf 13 سال پیش
والد
کامیت
b3908e22ad
1فایلهای تغییر یافته به همراه1 افزوده شده و 4 حذف شده
  1. 1 4
      net/dcb/dcbnl.c

+ 1 - 4
net/dcb/dcbnl.c

@@ -208,10 +208,7 @@ static struct sk_buff *dcbnl_newmsg(int type, u8 cmd, u32 port, u32 seq,
 		return NULL;
 
 	nlh = nlmsg_put(skb, port, seq, type, sizeof(*dcb), flags);
-	if (!nlh) {
-		/* header should always fit, allocation must be buggy */
-		BUG();
-	}
+	BUG_ON(!nlh);
 
 	dcb = nlmsg_data(nlh);
 	dcb->dcb_family = AF_UNSPEC;