瀏覽代碼

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>
Veaceslav Falico 11 年之前
父節點
當前提交
f6dcf561e6
共有 1 個文件被更改,包括 0 次插入2 次删除
  1. 0 2
      drivers/net/bonding/bonding.h

+ 0 - 2
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;
 }