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>
This commit is contained in:
Dan Carpenter 2016-01-06 12:56:30 +03:00 committed by David S. Miller
parent c406700cdf
commit 719255d0e2
1 changed files with 1 additions and 1 deletions

View File

@ -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"); dev_err(mlxsw_hwmon->bus_info->dev, "Failed to reset temp sensor history\n");
return err; return err;
} }
return err ? err : len; return len;
} }
static ssize_t mlxsw_hwmon_fan_rpm_show(struct device *dev, static ssize_t mlxsw_hwmon_fan_rpm_show(struct device *dev,