diff options
author | Sachin Kamat <sachin.kamat@linaro.org> | 2012-11-20 04:57:04 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-11-20 22:48:09 +0400 |
commit | 388dfc2d2d9c43c251921a397d6fe5ef7dc34731 (patch) | |
tree | 7a6c81d21ee830781c933a3170f86ee222b64bca /net/core | |
parent | 973b1b9a454c738edbb2eb8d4596014b575dc15c (diff) | |
download | linux-388dfc2d2d9c43c251921a397d6fe5ef7dc34731.tar.xz |
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) return -EINVAL; if (!len) { - if (dev->ifalias) { - kfree(dev->ifalias); - dev->ifalias = NULL; - } + kfree(dev->ifalias); + dev->ifalias = NULL; return 0; } |