mlxsw: spectrum_router: Drop unnecessary WARN_ON_ONCE()
authorIdo Schimmel <idosch@mellanox.com>
Tue, 12 Feb 2019 16:29:52 +0000 (16:29 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 12 Feb 2019 17:03:29 +0000 (12:03 -0500)
In case the register access failed an error would be logged anyway, so
we can drop the warning.

Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c

index 818040c..52fed8c 100644 (file)
@@ -6142,7 +6142,7 @@ static int mlxsw_sp_router_rif_disable(struct mlxsw_sp *mlxsw_sp, u16 rif)
 
        mlxsw_reg_ritr_rif_pack(ritr_pl, rif);
        err = mlxsw_reg_query(mlxsw_sp->core, MLXSW_REG(ritr), ritr_pl);
-       if (WARN_ON_ONCE(err))
+       if (err)
                return err;
 
        mlxsw_reg_ritr_enable_set(ritr_pl, false);