Skip to content

Commit

Permalink
bonding: remove NULL verification from bond_get_bond_by_slave()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Veaceslav Falico authored and David S. Miller committed May 22, 2014
1 parent dc73c41 commit f6dcf56
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions drivers/net/bonding/bonding.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit f6dcf56

Please sign in to comment.