Commit 719255d0 authored by Dan Carpenter's avatar Dan Carpenter Committed by David S. Miller

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: default avatarDan Carpenter <dan.carpenter@oracle.com>
Acked-by: default avatarJiri Pirko <jiri@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c406700c
......@@ -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,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment