bonding: comparing a u8 with -1 is always false
slave->duplex is a u8 type so the in bond_info_show_slave() when we check "if (slave->duplex == -1)", it's always false. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
27d240fdae
commit
589665f5a6
@@ -560,8 +560,8 @@ static int bond_update_speed_duplex(struct slave *slave)
|
||||
u32 slave_speed;
|
||||
int res;
|
||||
|
||||
slave->speed = -1;
|
||||
slave->duplex = -1;
|
||||
slave->speed = SPEED_UNKNOWN;
|
||||
slave->duplex = DUPLEX_UNKNOWN;
|
||||
|
||||
res = __ethtool_get_settings(slave_dev, &ecmd);
|
||||
if (res < 0)
|
||||
|
Reference in New Issue
Block a user