From bf6b260b8a9654db99761cde74c6b16356b9b441 Mon Sep 17 00:00:00 2001 From: Sven Eckelmann Date: Tue, 1 Jun 2021 23:40:16 +0200 Subject: 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 Signed-off-by: Simon Wunderlich --- net/batman-adv/hard-interface.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'net/batman-adv/hard-interface.c') 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)) { -- cgit v1.2.3