diff options
-rw-r--r-- | include/linux/netdevice.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 15ed750458ad..70256aa2ae81 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -3383,8 +3383,8 @@ extern struct pernet_operations __net_initdata loopback_net_ops; | |||
3383 | 3383 | ||
3384 | static inline const char *netdev_name(const struct net_device *dev) | 3384 | static inline const char *netdev_name(const struct net_device *dev) |
3385 | { | 3385 | { |
3386 | if (dev->reg_state != NETREG_REGISTERED) | 3386 | if (!dev->name[0] || strchr(dev->name, '%')) |
3387 | return "(unregistered net_device)"; | 3387 | return "(unnamed net_device)"; |
3388 | return dev->name; | 3388 | return dev->name; |
3389 | } | 3389 | } |
3390 | 3390 | ||