提交 672bda33 编写于 作者: J Jiri Pirko 提交者: David S. Miller

bonding: fix return value of couple of store functions

count is incorrectly returned even in case of fail. Return ret instead.
Signed-off-by: NJiri Pirko <jpirko@redhat.com>
Signed-off-by: NJay Vosburgh <fubar@us.ibm.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 a512b92b
...@@ -1198,7 +1198,7 @@ static ssize_t bonding_store_carrier(struct device *d, ...@@ -1198,7 +1198,7 @@ static ssize_t bonding_store_carrier(struct device *d,
bond->dev->name, new_value); bond->dev->name, new_value);
} }
out: out:
return count; return ret;
} }
static DEVICE_ATTR(use_carrier, S_IRUGO | S_IWUSR, static DEVICE_ATTR(use_carrier, S_IRUGO | S_IWUSR,
bonding_show_carrier, bonding_store_carrier); bonding_show_carrier, bonding_store_carrier);
...@@ -1595,7 +1595,7 @@ static ssize_t bonding_store_slaves_active(struct device *d, ...@@ -1595,7 +1595,7 @@ static ssize_t bonding_store_slaves_active(struct device *d,
} }
} }
out: out:
return count; return ret;
} }
static DEVICE_ATTR(all_slaves_active, S_IRUGO | S_IWUSR, static DEVICE_ATTR(all_slaves_active, S_IRUGO | S_IWUSR,
bonding_show_slaves_active, bonding_store_slaves_active); bonding_show_slaves_active, bonding_store_slaves_active);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册