]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
mlxsw: spectrum_ethtool: Remove redundant variable
authorIdo Schimmel <idosch@nvidia.com>
Wed, 26 Jan 2022 10:30:29 +0000 (12:30 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 26 Jan 2022 11:15:41 +0000 (11:15 +0000)
Remove the 'err' variable and simply return.

Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum_ethtool.c

index 20530712eadb30a42c7de5275234176dd458598f..68c0ddf3b6c1aac9515308dafbabb68277d7dbc7 100644 (file)
@@ -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,
-                                       mlxsw_sp_port->mapping.module,
-                                       modinfo);
 
-       return err;
+       return mlxsw_env_get_module_info(mlxsw_sp->core,
+                                        mlxsw_sp_port->mapping.module,
+                                        modinfo);
 }
 
 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,
-                                         mlxsw_sp_port->mapping.module, ee,
-                                         data);
 
-       return err;
+       return mlxsw_env_get_module_eeprom(netdev, mlxsw_sp->core,
+                                          mlxsw_sp_port->mapping.module, ee,
+                                          data);
 }
 
 static int