mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-05 00:20:32 +00:00
net: core: maybe return -EEXIST in __dev_alloc_name
If we're given format string with no %d, -EEXIST is a saner error code. Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
93809105cf
commit
d6f295e9de
1 changed files with 1 additions and 1 deletions
|
@ -1106,7 +1106,7 @@ static int __dev_alloc_name(struct net *net, const char *name, char *buf)
|
||||||
* when the name is long and there isn't enough space left
|
* when the name is long and there isn't enough space left
|
||||||
* for the digits, or if all bits are used.
|
* for the digits, or if all bits are used.
|
||||||
*/
|
*/
|
||||||
return -ENFILE;
|
return p ? -ENFILE : -EEXIST;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int dev_alloc_name_ns(struct net *net,
|
static int dev_alloc_name_ns(struct net *net,
|
||||||
|
|
Loading…
Reference in a new issue