net: make dev_get_port_parent_id slightly more readable
Cosmetic commit making dev_get_port_parent_id slightly more readable. There is no need to split the condition to return after calling devlink_compat_switch_id_get and after that 'recurse' is always true. Signed-off-by: Antoine Tenart <atenart@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
67999555ff
commit
c0288ae8e6
|
@ -9165,14 +9165,11 @@ int dev_get_port_parent_id(struct net_device *dev,
|
|||
}
|
||||
|
||||
err = devlink_compat_switch_id_get(dev, ppid);
|
||||
if (!err || err != -EOPNOTSUPP)
|
||||
if (!recurse || err != -EOPNOTSUPP)
|
||||
return err;
|
||||
|
||||
if (!recurse)
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
netdev_for_each_lower_dev(dev, lower_dev, iter) {
|
||||
err = dev_get_port_parent_id(lower_dev, ppid, recurse);
|
||||
err = dev_get_port_parent_id(lower_dev, ppid, true);
|
||||
if (err)
|
||||
break;
|
||||
if (!first.id_len)
|
||||
|
|
Loading…
Reference in New Issue