Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3a4a27d3 authored by Nikolay Aleksandrov's avatar Nikolay Aleksandrov Committed by David S. Miller
Browse files

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: default avatarNikolay Aleksandrov <nikolay@cumulusnetworks.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent db5dbec5
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -265,7 +265,6 @@ static void vrf_rtable_destroy(struct net_vrf *vrf)
{
	struct dst_entry *dst = (struct dst_entry *)vrf->rth;

	if (dst)
	dst_destroy(dst);
	vrf->rth = NULL;
}
@@ -455,7 +454,6 @@ 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);
	dev->dstats = NULL;
}