Skip to content

Commit 719255d

Browse files
Dan Carpenterdavem330
authored andcommitted
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 <[email protected]> Acked-by: Jiri Pirko <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent c406700 commit 719255d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/ethernet/mellanox/mlxsw/core_hwmon.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ static ssize_t mlxsw_hwmon_temp_rst_store(struct device *dev,
130130
dev_err(mlxsw_hwmon->bus_info->dev, "Failed to reset temp sensor history\n");
131131
return err;
132132
}
133-
return err ? err : len;
133+
return len;
134134
}
135135

136136
static ssize_t mlxsw_hwmon_fan_rpm_show(struct device *dev,

0 commit comments

Comments
 (0)