From f6dcf561e653fb3a5048b40cb96c10f6d4d25c86 Mon Sep 17 00:00:00 2001 From: Veaceslav Falico Date: Wed, 21 May 2014 17:42:01 +0200 Subject: [PATCH] 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 --- drivers/net/bonding/bonding.h | 2 -- 1 file changed, 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; } -- GitLab