From: Sachin Kamat Date: Tue, 20 Nov 2012 00:57:04 +0000 (+0000) Subject: net: Remove redundant null check before kfree in dev.c X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=388dfc2d2d9c43c251921a397d6fe5ef7dc34731;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git net: Remove redundant null check before kfree in dev.c kfree on a null pointer is a no-op. Signed-off-by: Sachin Kamat Signed-off-by: David S. Miller --- diff --git a/net/core/dev.c b/net/core/dev.c index 0afae8ba413e..7304ea8a1f13 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; }