Skip to content

Commit

Permalink
bonding: fix kstrtou8() return value verification in num_peer_notif
Browse files Browse the repository at this point in the history
It returns 0 in case of success, !0 error otherwise. Fix the improper error
verification.

Fixes: 2c9839c ("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>
  • Loading branch information
Veaceslav Falico authored and David S. Miller committed Jan 6, 2014
1 parent 31ca1de commit 0b23810
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/bonding/bond_sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 0b23810

Please sign in to comment.