Commit dfa96b55 authored by Pavel Tikhomirov's avatar Pavel Tikhomirov Committed by Pavel Emelyanov

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: 's avatarPavel Tikhomirov <ptikhomirov@odin.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent b87ae730
......@@ -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)
......
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