提交 3a4a27d3 编写于 作者: N Nikolay Aleksandrov 提交者: David S. Miller

vrf: don't check for dstats and rth in uninit path

dstats and rth are always present because we fail the device registration
if they can't be allocated in vrf_init() (ndo_init) so drop the unnecessary
checks.
Signed-off-by: NNikolay Aleksandrov <nikolay@cumulusnetworks.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 db5dbec5
......@@ -265,8 +265,7 @@ static void vrf_rtable_destroy(struct net_vrf *vrf)
{
struct dst_entry *dst = (struct dst_entry *)vrf->rth;
if (dst)
dst_destroy(dst);
dst_destroy(dst);
vrf->rth = NULL;
}
......@@ -455,8 +454,7 @@ static void vrf_dev_uninit(struct net_device *dev)
list_for_each_entry_safe(slave, next, head, list)
vrf_del_slave(dev, slave->dev);
if (dev->dstats)
free_percpu(dev->dstats);
free_percpu(dev->dstats);
dev->dstats = NULL;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册