Message ID | 1400686921-5698-3-git-send-email-vfalico@gmail.com |
---|---|
State | Accepted, archived |
Delegated to: | David Miller |
Headers | show |
diff --git a/drivers/net/bonding/bonding.h b/drivers/net/bonding/bonding.h index 44334b3d..dfc3779 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; }
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> --- drivers/net/bonding/bonding.h | 2 -- 1 file changed, 2 deletions(-)