summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2016-01-06 10:56:30 +0100
committerDavid S. Miller <davem@davemloft.net>2016-01-06 21:07:47 +0100
commit719255d0e29463ddba2d01a72c1e74092793103a (patch)
tree9427abd2947c56d701929f41de26c134077b7173
parentethernet/atheros/alx: sanitize buffer sizing and padding (diff)
downloadlinux-719255d0e29463ddba2d01a72c1e74092793103a.tar.xz
linux-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>
-rw-r--r--drivers/net/ethernet/mellanox/mlxsw/core_hwmon.c2
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,