diff options
author | Elad Raz <eladr@mellanox.com> | 2017-01-09 11:25:44 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-01-09 14:35:13 -0500 |
commit | 36ca68bf9919299c95ff80e7cf3c217f4c250cbe (patch) | |
tree | 7b9275d40690c73e3ca3e2138f47a968451a1ebc | |
parent | f89d21b9c310d43ad8513a3fe345b7677ee7ead7 (diff) | |
download | linux-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.c | 2 |
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. */ |