浏览代码

[BOND]: Fix warning in bond_sysfs.c

original_mtu is only used if we end up with a non-NULL
dev, and it is assigned in all such cases, but GCC can't
see that.

Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller 17 年之前
父节点
当前提交
6952d8923b
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      drivers/net/bonding/bond_sysfs.c

+ 1 - 0
drivers/net/bonding/bond_sysfs.c

@@ -341,6 +341,7 @@ static ssize_t bonding_store_slaves(struct device *d,
 
 	if (command[0] == '-') {
 		dev = NULL;
+		original_mtu = 0;
 		bond_for_each_slave(bond, slave, i)
 			if (strnicmp(slave->dev->name, ifname, IFNAMSIZ) == 0) {
 				dev = slave->dev;