Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d6f295e9 authored by Rasmus Villemoes's avatar Rasmus Villemoes Committed by David S. Miller
Browse files

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: default avatarRasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 93809105
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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,