projects
/
platform
/
kernel
/
linux-starfive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9380910
)
net: core: maybe return -EEXIST in __dev_alloc_name
author
Rasmus Villemoes
<linux@rasmusvillemoes.dk>
Sun, 12 Nov 2017 23:15:09 +0000
(
00:15
+0100)
committer
David S. Miller
<davem@davemloft.net>
Tue, 14 Nov 2017 07:38:46 +0000
(16:38 +0900)
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>
net/core/dev.c
patch
|
blob
|
history
diff --git
a/net/core/dev.c
b/net/core/dev.c
index cb3d95edf58d29710efb59198ff7c8d9ee886147..1bb856eaed1c42b012eb7aa253c2a301a451cff8 100644
(file)
--- a/
net/core/dev.c
+++ b/
net/core/dev.c
@@
-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
* for the digits, or if all bits are used.
*/
- return
-ENFILE
;
+ return
p ? -ENFILE : -EEXIST
;
}
static int dev_alloc_name_ns(struct net *net,