diff --git a/net/core/dev.c b/net/core/dev.c index 0afae8ba413e4976966f357bea2783727761ac1a..7304ea8a1f13a15097619c68d14820e963695573 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -1153,10 +1153,8 @@ int dev_set_alias(struct net_device *dev, const char *alias, size_t len) return -EINVAL; if (!len) { - if (dev->ifalias) { - kfree(dev->ifalias); - dev->ifalias = NULL; - } + kfree(dev->ifalias); + dev->ifalias = NULL; return 0; }