diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2016-01-06 12:56:30 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-01-06 15:07:47 -0500 |
commit | 719255d0e29463ddba2d01a72c1e74092793103a (patch) | |
tree | 9427abd2947c56d701929f41de26c134077b7173 /drivers/net/ethernet/mellanox/mlxsw/core_hwmon.c | |
parent | c406700cdf882b89cb036117414fcd8b0cc2656d (diff) | |
download | linux-stable-719255d0e29463ddba2d01a72c1e74092793103a.tar.gz linux-stable-719255d0e29463ddba2d01a72c1e74092793103a.tar.bz2 linux-stable-719255d0e29463ddba2d01a72c1e74092793103a.zip |
mlxsw: core: remove an unnecessary condition
We checked "err" on the lines before so we know it's zero here.
These cause a static checker warning because checking known things can
indicate a bug. Maybe there is a missing assignment or we are checking
the wrong variable.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlxsw/core_hwmon.c')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlxsw/core_hwmon.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlxsw/core_hwmon.c b/drivers/net/ethernet/mellanox/mlxsw/core_hwmon.c index 5b9364f4837d..1ac8bf187168 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/core_hwmon.c +++ b/drivers/net/ethernet/mellanox/mlxsw/core_hwmon.c @@ -130,7 +130,7 @@ static ssize_t mlxsw_hwmon_temp_rst_store(struct device *dev, dev_err(mlxsw_hwmon->bus_info->dev, "Failed to reset temp sensor history\n"); return err; } - return err ? err : len; + return len; } static ssize_t mlxsw_hwmon_fan_rpm_show(struct device *dev, |