mlxsw: Fix mlxsw_i2c_write return value
authorElad Raz <eladr@mellanox.com>
Mon, 9 Jan 2017 10:25:44 +0000 (11:25 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 9 Jan 2017 19:35:13 +0000 (14:35 -0500)
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>
drivers/net/ethernet/mellanox/mlxsw/i2c.c

index e50c8db..12c3a44 100644 (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. */