diff options
author | Sven Eckelmann <sven@narfation.org> | 2021-06-01 23:40:16 +0200 |
---|---|---|
committer | Simon Wunderlich <sw@simonwunderlich.de> | 2021-06-02 22:25:45 +0200 |
commit | bf6b260b8a9654db99761cde74c6b16356b9b441 (patch) | |
tree | 17da64e89fdbf5c817cf97452100560611a726f8 /net/batman-adv/hard-interface.c | |
parent | batman-adv: Fix spelling mistakes (diff) | |
download | linux-bf6b260b8a9654db99761cde74c6b16356b9b441.tar.xz linux-bf6b260b8a9654db99761cde74c6b16356b9b441.zip |
batman-adv: Drop implicit creation of batadv net_devices
The sysfs code in batman-adv was could create a new batadv interfaces on
demand when a string (interface name) was written to the
batman-adv/mesh_iface file. But the code no longer exists in the current
batman-adv codebase. The helper code to implement this behavior must be
considered as unused and can be dropped.
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
Diffstat (limited to 'net/batman-adv/hard-interface.c')
-rw-r--r-- | net/batman-adv/hard-interface.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/net/batman-adv/hard-interface.c b/net/batman-adv/hard-interface.c index b99f64f483fc..a638f35598f0 100644 --- a/net/batman-adv/hard-interface.c +++ b/net/batman-adv/hard-interface.c @@ -725,17 +725,9 @@ int batadv_hardif_enable_interface(struct batadv_hard_iface *hard_iface, kref_get(&hard_iface->refcount); soft_iface = dev_get_by_name(net, iface_name); - if (!soft_iface) { - soft_iface = batadv_softif_create(net, iface_name); - - if (!soft_iface) { - ret = -ENOMEM; - goto err; - } - - /* dev_get_by_name() increases the reference counter for us */ - dev_hold(soft_iface); + ret = -EINVAL; + goto err; } if (!batadv_softif_is_valid(soft_iface)) { |