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-Tag: v3.8-rc1~139^2~256 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=388dfc2d2d9c43c251921a397d6fe5ef7dc34731;p=platform%2Fkernel%2Flinux-exynos.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 0afae8b..7304ea8 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; }