From: Petr Machata Date: Mon, 31 Jul 2017 07:27:28 +0000 (+0200) Subject: mlxsw: spectrum_router: Simplify a piece of code X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=f1b1f273aec0478c17ead69c5f285edd495d3d58;p=openwrt%2Fstaging%2Fblogic.git mlxsw: spectrum_router: Simplify a piece of code Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c index b6df3c3b5290..600268cf4fa1 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c @@ -3124,9 +3124,7 @@ mlxsw_sp_rif_should_config(struct mlxsw_sp_rif *rif, struct net_device *dev, switch (event) { case NETDEV_UP: - if (!rif) - return true; - return false; + return rif == NULL; case NETDEV_DOWN: idev = __in_dev_get_rtnl(dev); if (idev && idev->ifa_list)