diff options
author | Sven Eckelmann <sven@narfation.org> | 2021-06-02 21:54:30 +0200 |
---|---|---|
committer | Simon Wunderlich <sw@simonwunderlich.de> | 2021-06-02 22:25:45 +0200 |
commit | 020577f879be736bc87e1f48dfad7220923401c0 (patch) | |
tree | c29e02503c5dca46e1a880804634e487771f897c /net/batman-adv | |
parent | 170258ce1c71dc4e03d5cb92b5f03cfb01941514 (diff) | |
download | linux-stable-020577f879be736bc87e1f48dfad7220923401c0.tar.gz linux-stable-020577f879be736bc87e1f48dfad7220923401c0.tar.bz2 linux-stable-020577f879be736bc87e1f48dfad7220923401c0.zip |
batman-adv: Drop reduntant batadv interface check
If batadv_hardif_enable_interface is called then its called from its
callback ndo_add_slave. It is therefore not necessary to check if it is a
batadv interface.
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
Diffstat (limited to 'net/batman-adv')
-rw-r--r-- | net/batman-adv/hard-interface.c | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/net/batman-adv/hard-interface.c b/net/batman-adv/hard-interface.c index 44b0aa30c30a..55d97e18aa4a 100644 --- a/net/batman-adv/hard-interface.c +++ b/net/batman-adv/hard-interface.c @@ -9,7 +9,6 @@ #include <linux/atomic.h> #include <linux/byteorder/generic.h> -#include <linux/errno.h> #include <linux/gfp.h> #include <linux/if.h> #include <linux/if_arp.h> @@ -698,14 +697,6 @@ int batadv_hardif_enable_interface(struct batadv_hard_iface *hard_iface, kref_get(&hard_iface->refcount); dev_hold(soft_iface); - - if (!batadv_softif_is_valid(soft_iface)) { - pr_err("Can't create batman mesh interface %s: already exists as regular interface\n", - soft_iface->name); - ret = -EINVAL; - goto err_dev; - } - hard_iface->soft_iface = soft_iface; bat_priv = netdev_priv(hard_iface->soft_iface); |