diff options
author | Jiri Pirko <jiri@mellanox.com> | 2015-09-03 14:04:17 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-09-05 22:02:11 -0700 |
commit | 0890cf6cb6ab1af650025670b1a839671a9a3fcb (patch) | |
tree | f520f23a9e7e0dcdd2d17d1c3a4a5bbfb38c7dc0 /net | |
parent | b65888796b72b677928527b17eeb8e935b767146 (diff) | |
download | linux-0890cf6cb6ab1af650025670b1a839671a9a3fcb.tar.gz linux-0890cf6cb6ab1af650025670b1a839671a9a3fcb.tar.bz2 linux-0890cf6cb6ab1af650025670b1a839671a9a3fcb.zip |
switchdev: fix return value of switchdev_port_fdb_dump in case of error
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>
Acked-by: Sridhar Samudrala <sridhar.samudrala@intel.com>
Acked-by: Scott Feldman<sfeldma@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/switchdev/switchdev.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/net/switchdev/switchdev.c b/net/switchdev/switchdev.c index 16c1c43980a1..fda38f830a10 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); |