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>
This commit is contained in:
Elad Raz 2017-01-09 11:25:44 +01:00 committed by David S. Miller
parent f89d21b9c3
commit 36ca68bf99
1 changed files with 1 additions and 1 deletions

View File

@ -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. */