]> git.karo-electronics.de Git - linux-beck.git/commitdiff
switchdev: fix return value of switchdev_port_fdb_dump in case of error
authorJiri Pirko <jiri@mellanox.com>
Thu, 3 Sep 2015 12:04:17 +0000 (14:04 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sun, 6 Sep 2015 05:02:11 +0000 (22:02 -0700)
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>
net/switchdev/switchdev.c

index 16c1c43980a12dbe11832ad61777333446b69eea..fda38f830a10869713177220f8d2066c6076da0c 100644 (file)
@@ -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);