From 36ca68bf9919299c95ff80e7cf3c217f4c250cbe Mon Sep 17 00:00:00 2001 From: Elad Raz Date: Mon, 9 Jan 2017 11:25:44 +0100 Subject: [PATCH] mlxsw: Fix mlxsw_i2c_write return value The "err" variable is been checked, return always 0. Signed-off-by: Elad Raz Acked-by: Ido Schimmel Acked-by: Vadim Pasternak Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller --- drivers/net/ethernet/mellanox/mlxsw/i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/mellanox/mlxsw/i2c.c b/drivers/net/ethernet/mellanox/mlxsw/i2c.c index e50c8db2602a..12c3a4449120 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/i2c.c +++ b/drivers/net/ethernet/mellanox/mlxsw/i2c.c @@ -338,7 +338,7 @@ mlxsw_i2c_write(struct device *dev, size_t in_mbox_size, u8 *in_mbox, int num, return -EIO; } - return err > 0 ? 0 : err; + return 0; } /* Routine executes I2C command. */ -- 2.20.1