summaryrefslogtreecommitdiff
path: root/net/ipv6
diff options
context:
space:
mode:
authorZheng Yongjun <zhengyongjun3@huawei.com>2021-06-08 09:53:15 +0800
committerDavid S. Miller <davem@davemloft.net>2021-06-08 11:36:48 -0700
commit5ac6b198d7e312bd10ebe7d58c64690dc59cc49a (patch)
treef6f1d1c5087de22010022be088a8a2d8245fd0c7 /net/ipv6
parentd612c3f3fae221e7ea736d196581c2217304bbbc (diff)
net: ipv4: Remove unneed BUG() function
When 'nla_parse_nested_deprecated' failed, it's no need to BUG() here, return -EINVAL is ok. Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6')
-rw-r--r--net/ipv6/addrconf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index b0ef65eb9bd2..701eb82acd1c 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -5827,7 +5827,7 @@ static int inet6_set_link_af(struct net_device *dev, const struct nlattr *nla,
return -EAFNOSUPPORT;
if (nla_parse_nested_deprecated(tb, IFLA_INET6_MAX, nla, NULL, NULL) < 0)
- BUG();
+ return -EINVAL;
if (tb[IFLA_INET6_TOKEN]) {
err = inet6_set_iftoken(idev, nla_data(tb[IFLA_INET6_TOKEN]),