projects
/
platform
/
kernel
/
linux-exynos.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
973b1b9
)
net: Remove redundant null check before kfree in dev.c
author
Sachin Kamat
<sachin.kamat@linaro.org>
Tue, 20 Nov 2012 00:57:04 +0000
(
00:57
+0000)
committer
David S. Miller
<davem@davemloft.net>
Tue, 20 Nov 2012 18:48:09 +0000
(13:48 -0500)
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>
net/core/dev.c
patch
|
blob
|
history
diff --git
a/net/core/dev.c
b/net/core/dev.c
index
0afae8b
..
7304ea8
100644
(file)
--- 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;
}