summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorElad Raz <eladr@mellanox.com>2017-01-09 11:25:44 +0100
committerDavid S. Miller <davem@davemloft.net>2017-01-09 14:35:13 -0500
commit36ca68bf9919299c95ff80e7cf3c217f4c250cbe (patch)
tree7b9275d40690c73e3ca3e2138f47a968451a1ebc
parentf89d21b9c310d43ad8513a3fe345b7677ee7ead7 (diff)
downloadlinux-36ca68bf9919299c95ff80e7cf3c217f4c250cbe.tar.bz2
mlxsw: Fix mlxsw_i2c_write return value
The "err" variable is been checked, return always 0. Signed-off-by: Elad Raz <eladr@mellanox.com> Acked-by: Ido Schimmel <idosch@mellanox.com> Acked-by: Vadim Pasternak <vadimp@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/mellanox/mlxsw/i2c.c2
1 files changed, 1 insertions, 1 deletions
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. */