diff options
author | Zheng Yongjun <zhengyongjun3@huawei.com> | 2021-06-08 09:53:15 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-06-08 11:36:48 -0700 |
commit | 5ac6b198d7e312bd10ebe7d58c64690dc59cc49a (patch) | |
tree | f6f1d1c5087de22010022be088a8a2d8245fd0c7 /net/ipv4 | |
parent | d612c3f3fae221e7ea736d196581c2217304bbbc (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/ipv4')
-rw-r--r-- | net/ipv4/devinet.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c index 2e35f68da40a..1c6429c353a9 100644 --- a/net/ipv4/devinet.c +++ b/net/ipv4/devinet.c @@ -1989,7 +1989,7 @@ static int inet_set_link_af(struct net_device *dev, const struct nlattr *nla, return -EAFNOSUPPORT; if (nla_parse_nested_deprecated(tb, IFLA_INET_MAX, nla, NULL, NULL) < 0) - BUG(); + return -EINVAL; if (tb[IFLA_INET_CONF]) { nla_for_each_nested(a, tb[IFLA_INET_CONF], rem) |