diff --git a/net/core/dev.c b/net/core/dev.c index 658337bf33e437773ef81359746068043481b579..1a5d31fdea273ad5a454a73a3b009b6a97151b9f 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -1064,7 +1064,7 @@ static int __dev_alloc_name(struct net *net, const char *name, char *buf) unsigned long *inuse; struct net_device *d; - p = strnchr(name, IFNAMSIZ-1, '%'); + p = strchr(name, '%'); if (p) { /* * Verify the string as this thing may have come from