mlxsw: spectrum_router: Simplify a piece of code
Signed-off-by: Petr Machata <petrm@mellanox.com> Reviewed-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
83930cd76a
commit
f1b1f273ae
|
@ -3124,9 +3124,7 @@ mlxsw_sp_rif_should_config(struct mlxsw_sp_rif *rif, struct net_device *dev,
|
||||||
|
|
||||||
switch (event) {
|
switch (event) {
|
||||||
case NETDEV_UP:
|
case NETDEV_UP:
|
||||||
if (!rif)
|
return rif == NULL;
|
||||||
return true;
|
|
||||||
return false;
|
|
||||||
case NETDEV_DOWN:
|
case NETDEV_DOWN:
|
||||||
idev = __in_dev_get_rtnl(dev);
|
idev = __in_dev_get_rtnl(dev);
|
||||||
if (idev && idev->ifa_list)
|
if (idev && idev->ifa_list)
|
||||||
|
|
Loading…
Reference in New Issue