Commit 70e1b14c authored by Jakub Kicinski's avatar Jakub Kicinski
Browse files

net: remove dev_valid_name() check from __dev_alloc_name()



__dev_alloc_name() is only called by dev_prep_valid_name(),
which already checks that name is valid.

Reviewed-by: default avatarJiri Pirko <jiri@nvidia.com>
Link: https://lore.kernel.org/r/20231023152346.3639749-6-kuba@kernel.org


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 7ad17b04
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -1077,9 +1077,6 @@ static int __dev_alloc_name(struct net *net, const char *name, char *res)
	struct net_device *d;
	char buf[IFNAMSIZ];

	if (!dev_valid_name(name))
		return -EINVAL;

	/* Verify the string as this thing may have come from the user.
	 * There must be one "%d" and no other "%" characters.
	 */