From: Dan Carpenter Date: Wed, 9 Dec 2015 10:41:29 +0000 (+0300) Subject: mlxsw: core: remove an unneeded condition X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=515123e286b686d32256342318f20ff932ebac1b;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git mlxsw: core: remove an unneeded condition We already know "err" is zero so there is no need to check. Signed-off-by: Dan Carpenter Acked-by: Jiri Pirko Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/mellanox/mlxsw/core_hwmon.c b/drivers/net/ethernet/mellanox/mlxsw/core_hwmon.c index 4dad146b41ae..913106d37bb0 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/core_hwmon.c +++ b/drivers/net/ethernet/mellanox/mlxsw/core_hwmon.c @@ -169,7 +169,7 @@ static ssize_t mlxsw_hwmon_pwm_store(struct device *dev, dev_err(mlxsw_hwmon->bus_info->dev, "Failed to write PWM\n"); return err; } - return err ? err : len; + return len; } enum mlxsw_hwmon_attr_type {