mirror of
https://github.com/torvalds/linux.git
synced 2026-05-29 17:43:52 +02:00
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: Jiri Pirko <jiri@nvidia.com> Link: https://lore.kernel.org/r/20231023152346.3639749-6-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
7ad17b04dc
commit
70e1b14c1b
|
|
@ -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.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user