From: David S. Miller Date: Mon, 2 Apr 2012 00:23:06 +0000 (-0400) Subject: macvlan: Stop using NLA_PUT*(). X-Git-Tag: next-20120404~37^2~37 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=ead9a76ceec34df18dc84cb22053253bd5564376;p=karo-tx-linux.git macvlan: Stop using NLA_PUT*(). These macros contain a hidden goto, and are thus extremely error prone and make code hard to audit. Signed-off-by: David S. Miller --- diff --git a/drivers/net/macvlan.c b/drivers/net/macvlan.c index f975afdc315c..b17fc9007099 100644 --- a/drivers/net/macvlan.c +++ b/drivers/net/macvlan.c @@ -773,7 +773,8 @@ static int macvlan_fill_info(struct sk_buff *skb, { struct macvlan_dev *vlan = netdev_priv(dev); - NLA_PUT_U32(skb, IFLA_MACVLAN_MODE, vlan->mode); + if (nla_put_u32(skb, IFLA_MACVLAN_MODE, vlan->mode)) + goto nla_put_failure; return 0; nla_put_failure: