diff options
author | Veaceslav Falico <vfalico@redhat.com> | 2014-01-06 11:54:40 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-01-06 16:26:00 -0500 |
commit | 0b23810d8c37a707abb076394c4bca76362cf06d (patch) | |
tree | 2584688737f876308999ee333925b06488303ae8 /drivers/net/bonding | |
parent | 31ca1decfbc5fe86094c6c8f0a590a2c0a29fabf (diff) | |
download | op-kernel-dev-0b23810d8c37a707abb076394c4bca76362cf06d.zip op-kernel-dev-0b23810d8c37a707abb076394c4bca76362cf06d.tar.gz |
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: 2c9839c143bbc ("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>
Diffstat (limited to 'drivers/net/bonding')
-rw-r--r-- | drivers/net/bonding/bond_sysfs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/bonding/bond_sysfs.c b/drivers/net/bonding/bond_sysfs.c index 9a1ea4a..011f163 100644 --- a/drivers/net/bonding/bond_sysfs.c +++ b/drivers/net/bonding/bond_sysfs.c @@ -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; |