netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] bonding: fix kstrtou8() return value verification in num_peer_notif
@ 2014-01-06 10:54 Veaceslav Falico
  2014-01-06 17:02 ` Scott Feldman
  2014-01-06 21:26 ` David Miller
  0 siblings, 2 replies; 4+ messages in thread
From: Veaceslav Falico @ 2014-01-06 10:54 UTC (permalink / raw)
  To: netdev; +Cc: Veaceslav Falico, sfeldma, Jay Vosburgh, Andy Gospodarek

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>
---
 drivers/net/bonding/bond_sysfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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;
-- 
1.8.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-01-06 21:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-06 10:54 [PATCH net-next] bonding: fix kstrtou8() return value verification in num_peer_notif Veaceslav Falico
2014-01-06 17:02 ` Scott Feldman
2014-01-06 21:26   ` David Miller
2014-01-06 21:26 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).