提交 6a986ce4 编写于 作者: E Eric Sesterhenn 提交者: Jeff Garzik

[PATCH] bonding: fix ->get_settings error checking

Since get_settings() returns a signed int and it gets checked
for < 0 to catch an error, res should be a signed int too.
Signed-off-by: NEric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: NAlexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: NJeff Garzik <jgarzik@pobox.com>
上级 3ee68c4a
...@@ -576,7 +576,7 @@ static int bond_update_speed_duplex(struct slave *slave) ...@@ -576,7 +576,7 @@ static int bond_update_speed_duplex(struct slave *slave)
slave->duplex = DUPLEX_FULL; slave->duplex = DUPLEX_FULL;
if (slave_dev->ethtool_ops) { if (slave_dev->ethtool_ops) {
u32 res; int res;
if (!slave_dev->ethtool_ops->get_settings) { if (!slave_dev->ethtool_ops->get_settings) {
return -1; return -1;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册