mlxsw: core: remove an unnecessary condition
PATCH 1/1 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.
drivers/net/ethernet/mellanox/mlxsw/core_hwmon.c +1 -1
@@ -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,
Quoted 7 lines · Wed, Jan 06, 2016 at 10:56:30AM CET, [email protected] wrote:
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 <[email protected]>
From: Dan Carpenter <[email protected]>
Date: Wed, 6 Jan 2016 12:56:30 +0300
Quoted 7 lines
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 <[email protected]>
Applied, thanks Dan.