From dfa96b5514dfd54900ea3212581e902b4a37c56c Mon Sep 17 00:00:00 2001 From: Pavel Tikhomirov Date: Fri, 10 Apr 2015 10:12:00 +0300 Subject: [PATCH] netdevconf: remove redundant and unsafe check we don't need this check as just after it we have: if (ret) break; which safely unpackes nde, and closes nlsk and img in case of error ps: sorry for inconveniences caused by my patchset Signed-off-by: Pavel Tikhomirov Signed-off-by: Pavel Emelyanov --- net.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/net.c b/net.c index acd1ca15b..3a32b43a4 100644 --- a/net.c +++ b/net.c @@ -478,16 +478,13 @@ static int restore_links(int pid, NetnsEntry **netns) goto exit; } - if (nde->conf) { + if (nde->conf) /* * optimize restore of devices configuration except lo * lo is created with namespace and before default is set * so we cant optimize its restore */ ret = ipv4_conf_op(nde->name, nde->conf, CTL_WRITE, nde->type == ND_TYPE__LOOPBACK ? NULL : netns); - if (ret < 0) - return ret; - } exit: net_device_entry__free_unpacked(nde, NULL); if (ret)