summaryrefslogtreecommitdiffstats
path: root/net/core
diff options
context:
space:
mode:
authorAlexander Duyck <alexander.h.duyck@intel.com>2014-07-15 15:15:20 -0700
committerDavid S. Miller <davem@davemloft.net>2014-07-16 23:13:26 -0700
commitc8a89c4a1d58230192cf7243520bf7f9899239f4 (patch)
treec2f03addc5abf7a979e0c97eb0f22269ac3a656a /net/core
parenta40e0a664bce465a3b8ad1d792153cef8ded9f7d (diff)
downloadop-kernel-dev-c8a89c4a1d58230192cf7243520bf7f9899239f4.zip
op-kernel-dev-c8a89c4a1d58230192cf7243520bf7f9899239f4.tar.gz
rtnetlink: Drop unnecessary return value from ndo_dflt_fdb_del
This change cleans up ndo_dflt_fdb_del to drop the ENOTSUPP return value since that isn't actually returned anywhere in the code. As a result we are able to drop a few lines by just defaulting this to -EINVAL. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r--net/core/rtnetlink.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index e991802..8d39071 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -2392,22 +2392,20 @@ int ndo_dflt_fdb_del(struct ndmsg *ndm,
struct net_device *dev,
const unsigned char *addr)
{
- int err = -EOPNOTSUPP;
+ int err = -EINVAL;
/* If aging addresses are supported device will need to
* implement its own handler for this.
*/
if (!(ndm->ndm_state & NUD_PERMANENT)) {
pr_info("%s: FDB only supports static addresses\n", dev->name);
- return -EINVAL;
+ return err;
}
if (is_unicast_ether_addr(addr) || is_link_local_ether_addr(addr))
err = dev_uc_del(dev, addr);
else if (is_multicast_ether_addr(addr))
err = dev_mc_del(dev, addr);
- else
- err = -EINVAL;
return err;
}
OpenPOWER on IntegriCloud