Commit 36ca68bf authored by Elad Raz's avatar Elad Raz Committed by David S. Miller

mlxsw: Fix mlxsw_i2c_write return value

The "err" variable is been checked, return always 0.
Signed-off-by: default avatarElad Raz <eladr@mellanox.com>
Acked-by: default avatarIdo Schimmel <idosch@mellanox.com>
Acked-by: default avatarVadim Pasternak <vadimp@mellanox.com>
Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent f89d21b9
...@@ -338,7 +338,7 @@ mlxsw_i2c_write(struct device *dev, size_t in_mbox_size, u8 *in_mbox, int num, ...@@ -338,7 +338,7 @@ mlxsw_i2c_write(struct device *dev, size_t in_mbox_size, u8 *in_mbox, int num,
return -EIO; return -EIO;
} }
return err > 0 ? 0 : err; return 0;
} }
/* Routine executes I2C command. */ /* Routine executes I2C command. */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment