[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1353409024-28853-1-git-send-email-sachin.kamat@linaro.org>
Date: Tue, 20 Nov 2012 16:27:04 +0530
From: Sachin Kamat <sachin.kamat@...aro.org>
To: netdev@...r.kernel.org
Cc: davem@...emloft.net, edumazet@...gle.com, sachin.kamat@...aro.org,
patches@...aro.org
Subject: [PATCH 1/2] 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@...aro.org>
---
net/core/dev.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/net/core/dev.c b/net/core/dev.c
index 83232a1..c380913 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -1075,10 +1075,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;
}
--
1.7.4.1
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists