mirror of
https://github.com/torvalds/linux.git
synced 2025-04-12 06:49:52 +00:00
net: vxlan: 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
b34a6e73fa
commit
6ef1ca2d14
@ -277,8 +277,7 @@ static void __vxlan_fdb_notify(struct vxlan_dev *vxlan, struct vxlan_fdb *fdb,
|
||||
rtnl_notify(skb, net, 0, RTNLGRP_NEIGH, NULL, GFP_ATOMIC);
|
||||
return;
|
||||
errout:
|
||||
if (err < 0)
|
||||
rtnl_set_sk_err(net, RTNLGRP_NEIGH, err);
|
||||
rtnl_set_sk_err(net, RTNLGRP_NEIGH, err);
|
||||
}
|
||||
|
||||
static void vxlan_fdb_switchdev_notifier_info(const struct vxlan_dev *vxlan,
|
||||
|
Loading…
x
Reference in New Issue
Block a user