Commit 5c759fe2 authored by Ido Schimmel's avatar Ido Schimmel Committed by David S. Miller
Browse files

mlxsw: spectrum_ethtool: Remove redundant variable



Remove the 'err' variable and simply return.

Signed-off-by: default avatarIdo Schimmel <idosch@nvidia.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ab14f180
Loading
Loading
Loading
Loading
+6 −12
Original line number Diff line number Diff line
@@ -1034,13 +1034,10 @@ static int mlxsw_sp_get_module_info(struct net_device *netdev,
{
	struct mlxsw_sp_port *mlxsw_sp_port = netdev_priv(netdev);
	struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp;
	int err;

	err = mlxsw_env_get_module_info(mlxsw_sp->core,
	return mlxsw_env_get_module_info(mlxsw_sp->core,
					 mlxsw_sp_port->mapping.module,
					 modinfo);

	return err;
}

static int mlxsw_sp_get_module_eeprom(struct net_device *netdev,
@@ -1048,13 +1045,10 @@ static int mlxsw_sp_get_module_eeprom(struct net_device *netdev,
{
	struct mlxsw_sp_port *mlxsw_sp_port = netdev_priv(netdev);
	struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp;
	int err;

	err = mlxsw_env_get_module_eeprom(netdev, mlxsw_sp->core,
	return mlxsw_env_get_module_eeprom(netdev, mlxsw_sp->core,
					   mlxsw_sp_port->mapping.module, ee,
					   data);

	return err;
}

static int