]> www.infradead.org Git - users/jedix/linux-maple.git/commit
bonding: comparing a u8 with -1 is always false
authorJoe Jin <joe.jin@oracle.com>
Mon, 27 Aug 2012 06:35:28 +0000 (14:35 +0800)
committerJoe Jin <joe.jin@oracle.com>
Tue, 28 Aug 2012 07:21:27 +0000 (15:21 +0800)
commite403d76d85dab08a63a93151245d580934a67663
tree9f1a4b810e8f0e33deec3b1fcab0437c581a2df7
parent96035afcbde2703b517476206f6d7e5d4abab4ff
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.

(backported from upstream commit 589665f5a6008dbce1d0af2cb93e94a80bf78151)
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
drivers/net/bonding/bond_main.c
drivers/net/bonding/bond_procfs.c
include/linux/ethtool.h