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

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.orgSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 7ad17b04
......@@ -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.
*/
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment