diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2011-11-04 04:21:38 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-11-04 18:37:23 -0400 |
commit | 589665f5a6008dbce1d0af2cb93e94a80bf78151 (patch) | |
tree | 4f4ec1949dd233a8474c2cb477da3637166b6e75 /drivers/net/bonding/bond_main.c | |
parent | 27d240fdae2808d727ad9ce48ec029731a457524 (diff) |
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>
Diffstat (limited to 'drivers/net/bonding/bond_main.c')
-rw-r--r-- | drivers/net/bonding/bond_main.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index b2b9109b6712..b0c577256487 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c | |||
@@ -560,8 +560,8 @@ static int bond_update_speed_duplex(struct slave *slave) | |||
560 | u32 slave_speed; | 560 | u32 slave_speed; |
561 | int res; | 561 | int res; |
562 | 562 | ||
563 | slave->speed = -1; | 563 | slave->speed = SPEED_UNKNOWN; |
564 | slave->duplex = -1; | 564 | slave->duplex = DUPLEX_UNKNOWN; |
565 | 565 | ||
566 | res = __ethtool_get_settings(slave_dev, &ecmd); | 566 | res = __ethtool_get_settings(slave_dev, &ecmd); |
567 | if (res < 0) | 567 | if (res < 0) |