提交 0b23810d 编写于 作者: V Veaceslav Falico 提交者: David S. Miller

bonding: fix kstrtou8() return value verification in num_peer_notif

It returns 0 in case of success, !0 error otherwise. Fix the improper error
verification.

Fixes: 2c9839c1 ("bonding: add num_grat_arp attribute netlink support")
CC: sfeldma@cumulusnetworks.com
CC: Jay Vosburgh <fubar@us.ibm.com>
CC: Andy Gospodarek <andy@greyhouse.net>
Signed-off-by: NVeaceslav Falico <vfalico@redhat.com>
Acked-by: NScott Feldman <sfeldma@cumulusnetworks.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 31ca1dec
......@@ -776,7 +776,7 @@ static ssize_t bonding_store_num_peer_notif(struct device *d,
int ret;
ret = kstrtou8(buf, 10, &new_value);
if (!ret) {
if (ret) {
pr_err("%s: invalid value %s specified.\n",
bond->dev->name, buf);
return ret;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册