提交 d6f295e9 编写于 作者: R Rasmus Villemoes 提交者: David S. Miller

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: NRasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 93809105
......@@ -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,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
新手
引导
客服 返回
顶部