mirror of
https://github.com/torvalds/linux
synced 2024-11-05 18:23:50 +00:00
vrf: remove unnecessary duplicate check
The upper/lower functions already check for duplicate slaves so no need to do it again. Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
e367da02fe
commit
67f3a90b54
1 changed files with 0 additions and 8 deletions
|
@ -352,7 +352,6 @@ static int do_vrf_add_slave(struct net_device *dev, struct net_device *port_dev)
|
|||
{
|
||||
struct net_vrf_dev *vrf_ptr = kmalloc(sizeof(*vrf_ptr), GFP_KERNEL);
|
||||
struct slave *slave = kzalloc(sizeof(*slave), GFP_KERNEL);
|
||||
struct slave *duplicate_slave;
|
||||
struct net_vrf *vrf = netdev_priv(dev);
|
||||
struct slave_queue *queue = &vrf->queue;
|
||||
int ret = -ENOMEM;
|
||||
|
@ -361,16 +360,9 @@ static int do_vrf_add_slave(struct net_device *dev, struct net_device *port_dev)
|
|||
goto out_fail;
|
||||
|
||||
slave->dev = port_dev;
|
||||
|
||||
vrf_ptr->ifindex = dev->ifindex;
|
||||
vrf_ptr->tb_id = vrf->tb_id;
|
||||
|
||||
duplicate_slave = __vrf_find_slave_dev(queue, port_dev);
|
||||
if (duplicate_slave) {
|
||||
ret = -EBUSY;
|
||||
goto out_fail;
|
||||
}
|
||||
|
||||
__vrf_insert_slave(queue, slave);
|
||||
|
||||
/* register the packet handler for slave ports */
|
||||
|
|
Loading…
Reference in a new issue