aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/dev.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/core/dev.c')
-rw-r--r--net/core/dev.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index f1647d7dd14b..ddfef3b45bab 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -883,6 +883,9 @@ int dev_change_name(struct net_device *dev, char *newname)
883 if (!dev_valid_name(newname)) 883 if (!dev_valid_name(newname))
884 return -EINVAL; 884 return -EINVAL;
885 885
886 if (strncmp(newname, dev->name, IFNAMSIZ) == 0)
887 return 0;
888
886 memcpy(oldname, dev->name, IFNAMSIZ); 889 memcpy(oldname, dev->name, IFNAMSIZ);
887 890
888 if (strchr(newname, '%')) { 891 if (strchr(newname, '%')) {