Commit 388dfc2d authored by Sachin Kamat's avatar Sachin Kamat Committed by David S. Miller

net: Remove redundant null check before kfree in dev.c

kfree on a null pointer is a no-op.
Signed-off-by: default avatarSachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 973b1b9a
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment