mlxsw: core: remove an unnecessary condition
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 6 Jan 2016 09:56:30 +0000 (12:56 +0300)
committerDavid S. Miller <davem@davemloft.net>
Wed, 6 Jan 2016 20:07:47 +0000 (15:07 -0500)
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>
drivers/net/ethernet/mellanox/mlxsw/core_hwmon.c

index 5b9364f4837df3ed3928411b69ee6262b43e0010..1ac8bf187168be0ad2ce41f10a0793078481fda8 100644 (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");
                return err;
        }
-       return err ? err : len;
+       return len;
 }
 
 static ssize_t mlxsw_hwmon_fan_rpm_show(struct device *dev,