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: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
diff --git a/drivers/net/vrf.c b/drivers/net/vrf.c
index 3d7da0c..97605ea 100644
--- a/drivers/net/vrf.c
+++ b/drivers/net/vrf.c
@@ -265,8 +265,7 @@
{
struct dst_entry *dst = (struct dst_entry *)vrf->rth;
- if (dst)
- dst_destroy(dst);
+ dst_destroy(dst);
vrf->rth = NULL;
}
@@ -455,8 +454,7 @@
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;
}