mlxsw: core: remove an unneeded condition
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 9 Dec 2015 10:41:29 +0000 (13:41 +0300)
committerDavid S. Miller <davem@davemloft.net>
Sat, 12 Dec 2015 01:10:55 +0000 (20:10 -0500)
We already know "err" is zero so there is no need to check.

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 4dad146b41ae5db1f931201fc48aca944f60da67..913106d37bb05a4a67b36568d1b1c26f156319a2 100644 (file)
@@ -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 {