mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-27 14:45:19 +00:00
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: 2c9839c143
("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: Veaceslav Falico <vfalico@redhat.com>
Acked-by: Scott Feldman <sfeldma@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
31ca1decfb
commit
0b23810d8c
1 changed files with 1 additions and 1 deletions
|
@ -776,7 +776,7 @@ static ssize_t bonding_store_num_peer_notif(struct device *d,
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
ret = kstrtou8(buf, 10, &new_value);
|
ret = kstrtou8(buf, 10, &new_value);
|
||||||
if (!ret) {
|
if (ret) {
|
||||||
pr_err("%s: invalid value %s specified.\n",
|
pr_err("%s: invalid value %s specified.\n",
|
||||||
bond->dev->name, buf);
|
bond->dev->name, buf);
|
||||||
return ret;
|
return ret;
|
||||||
|
|
Loading…
Reference in a new issue