summaryrefslogtreecommitdiff
path: root/drivers/net/bonding/bonding.h
diff options
context:
space:
mode:
authorVeaceslav Falico <vfalico@gmail.com>2014-05-21 17:42:01 +0200
committerDavid S. Miller <davem@davemloft.net>2014-05-22 15:46:34 -0400
commitf6dcf561e653fb3a5048b40cb96c10f6d4d25c86 (patch)
tree8fac08b65e226b156f8cfe3089fb8dfbae4cc323 /drivers/net/bonding/bonding.h
parentdc73c41f4e0bdc3e43b6247d2b35e927739f1d9f (diff)
bonding: remove NULL verification from bond_get_bond_by_slave()
Every caller relies on the result being the actual bond, so this verification just masks the real problem. CC: Jay Vosburgh <j.vosburgh@gmail.com> CC: Andy Gospodarek <andy@greyhouse.net> Signed-off-by: Veaceslav Falico <vfalico@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bonding/bonding.h')
-rw-r--r--drivers/net/bonding/bonding.h2
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/net/bonding/bonding.h b/drivers/net/bonding/bonding.h
index 44334b3d3b88..dfc37797df41 100644
--- a/drivers/net/bonding/bonding.h
+++ b/drivers/net/bonding/bonding.h
@@ -249,8 +249,6 @@ static inline struct slave *bond_get_slave_by_dev(struct bonding *bond,
static inline struct bonding *bond_get_bond_by_slave(struct slave *slave)
{
- if (!slave || !slave->bond)
- return NULL;
return slave->bond;
}