Skip to content
This repository has been archived by the owner on Sep 24, 2020. It is now read-only.

Commit

Permalink
Merge pull request #2 from vcaputo/v4.2.2-coreos-switchdev_idx_fixes
Browse files Browse the repository at this point in the history
switchdev: fix return value of switchdev_port_fdb_dump() errors
  • Loading branch information
vcaputo committed Nov 17, 2015
2 parents cfc0008 + d5eda9e commit 7a17ede
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion include/net/switchdev.h
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ static inline int switchdev_port_fdb_dump(struct sk_buff *skb,
struct net_device *filter_dev,
int idx)
{
return -EOPNOTSUPP;
return idx;
}

#endif
Expand Down
6 changes: 1 addition & 5 deletions net/switchdev/switchdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 7a17ede

Please sign in to comment.