summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSachin Kamat <sachin.kamat@linaro.org>2012-11-20 00:57:04 +0000
committerDavid S. Miller <davem@davemloft.net>2012-11-20 13:48:09 -0500
commit388dfc2d2d9c43c251921a397d6fe5ef7dc34731 (patch)
tree7a6c81d21ee830781c933a3170f86ee222b64bca
parent973b1b9a454c738edbb2eb8d4596014b575dc15c (diff)
net: Remove redundant null check before kfree in dev.c
kfree on a null pointer is a no-op. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--net/core/dev.c6
1 files changed, 2 insertions, 4 deletions
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;
}