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>
This commit is contained in:
Alexander Duyck 2014-07-15 15:15:20 -07:00 committed by David S. Miller
parent a40e0a664b
commit c8a89c4a1d
1 changed files with 2 additions and 4 deletions

View File

@ -2392,22 +2392,20 @@ int ndo_dflt_fdb_del(struct ndmsg *ndm,
struct net_device *dev, struct net_device *dev,
const unsigned char *addr) const unsigned char *addr)
{ {
int err = -EOPNOTSUPP; int err = -EINVAL;
/* If aging addresses are supported device will need to /* If aging addresses are supported device will need to
* implement its own handler for this. * implement its own handler for this.
*/ */
if (!(ndm->ndm_state & NUD_PERMANENT)) { if (!(ndm->ndm_state & NUD_PERMANENT)) {
pr_info("%s: FDB only supports static addresses\n", dev->name); 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)) if (is_unicast_ether_addr(addr) || is_link_local_ether_addr(addr))
err = dev_uc_del(dev, addr); err = dev_uc_del(dev, addr);
else if (is_multicast_ether_addr(addr)) else if (is_multicast_ether_addr(addr))
err = dev_mc_del(dev, addr); err = dev_mc_del(dev, addr);
else
err = -EINVAL;
return err; return err;
} }