netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch net] switchdev: fix return value of switchdev_port_fdb_dump in case of error
@ 2015-09-03 12:04 Jiri Pirko
  2015-09-03 16:59 ` Samudrala, Sridhar
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Jiri Pirko @ 2015-09-03 12:04 UTC (permalink / raw)
  To: netdev; +Cc: davem, idosch, eladr, sridhar.samudrala, sfeldma, Jiri Pirko

From: Jiri Pirko <jiri@mellanox.com>

switchdev_port_fdb_dump is used as .ndo_fdb_dump. Its return value is
idx, so we cannot return errval.

Fixes: 45d4122ca7cd ("switchdev: add support for fdb add/del/dump via switchdev_port_obj ops.")
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
---
 net/switchdev/switchdev.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/net/switchdev/switchdev.c b/net/switchdev/switchdev.c
index 16c1c43..fda38f8 100644
--- a/net/switchdev/switchdev.c
+++ b/net/switchdev/switchdev.c
@@ -853,12 +853,8 @@ int switchdev_port_fdb_dump(struct sk_buff *skb, struct netlink_callback *cb,
 		.cb = cb,
 		.idx = idx,
 	};
-	int err;
-
-	err = switchdev_port_obj_dump(dev, &dump.obj);
-	if (err)
-		return err;
 
+	switchdev_port_obj_dump(dev, &dump.obj);
 	return dump.idx;
 }
 EXPORT_SYMBOL_GPL(switchdev_port_fdb_dump);
-- 
1.9.3

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

end of thread, other threads:[~2015-09-06  5:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-03 12:04 [patch net] switchdev: fix return value of switchdev_port_fdb_dump in case of error Jiri Pirko
2015-09-03 16:59 ` Samudrala, Sridhar
2015-09-03 17:35 ` Scott Feldman
2015-09-06  5:02 ` 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).