diff options
author | Sachin Kamat <sachin.kamat@linaro.org> | 2012-11-19 19:57:04 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-11-20 13:48:09 -0500 |
commit | 388dfc2d2d9c43c251921a397d6fe5ef7dc34731 (patch) | |
tree | 7a6c81d21ee830781c933a3170f86ee222b64bca /net/core | |
parent | 973b1b9a454c738edbb2eb8d4596014b575dc15c (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>
Diffstat (limited to 'net/core')
-rw-r--r-- | 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 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) | |||
1153 | return -EINVAL; | 1153 | return -EINVAL; |
1154 | 1154 | ||
1155 | if (!len) { | 1155 | if (!len) { |
1156 | if (dev->ifalias) { | 1156 | kfree(dev->ifalias); |
1157 | kfree(dev->ifalias); | 1157 | dev->ifalias = NULL; |
1158 | dev->ifalias = NULL; | ||
1159 | } | ||
1160 | return 0; | 1158 | return 0; |
1161 | } | 1159 | } |
1162 | 1160 | ||