mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-09-21 12:11:49 +08:00
ip6mr: delete redundant judgment statements
The initial value of err is -ENOBUFS, and err is guaranteed to be less than 0 before all goto errout. Therefore, on the error path of errout, there is no need to repeatedly judge that err is less than 0, and delete redundant judgments to make the code more concise. Signed-off-by: Li Zetao <lizetao1@huawei.com> Reviewed-by: Petr Machata <petrm@nvidia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
649c3c9b8e
commit
aa32799c01
@ -2431,8 +2431,7 @@ static void mr6_netlink_event(struct mr_table *mrt, struct mfc6_cache *mfc,
|
||||
|
||||
errout:
|
||||
kfree_skb(skb);
|
||||
if (err < 0)
|
||||
rtnl_set_sk_err(net, RTNLGRP_IPV6_MROUTE, err);
|
||||
rtnl_set_sk_err(net, RTNLGRP_IPV6_MROUTE, err);
|
||||
}
|
||||
|
||||
static size_t mrt6msg_netlink_msgsize(size_t payloadlen)
|
||||
|
Loading…
Reference in New Issue
Block a user