From: Veaceslav Falico Date: Wed, 21 May 2014 15:42:01 +0000 (+0200) Subject: bonding: remove NULL verification from bond_get_bond_by_slave() X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=f6dcf561e653fb3a5048b40cb96c10f6d4d25c86;p=openwrt%2Fstaging%2Fblogic.git 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 CC: Andy Gospodarek Signed-off-by: Veaceslav Falico Signed-off-by: David S. Miller --- 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; }