diff options
author | Zheng Yongjun <zhengyongjun3@huawei.com> | 2021-06-08 04:53:15 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-06-08 21:36:48 +0300 |
commit | 5ac6b198d7e312bd10ebe7d58c64690dc59cc49a (patch) | |
tree | f6f1d1c5087de22010022be088a8a2d8245fd0c7 /net/ipv6/addrconf.c | |
parent | d612c3f3fae221e7ea736d196581c2217304bbbc (diff) | |
download | linux-5ac6b198d7e312bd10ebe7d58c64690dc59cc49a.tar.xz |
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/addrconf.c')
-rw-r--r-- | net/ipv6/addrconf.c | 2 |
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]), |