[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1439918884-13681-4-git-send-email-razor@blackwall.org>
Date: Tue, 18 Aug 2015 20:28:03 +0300
From: Nikolay Aleksandrov <razor@...ckwall.org>
To: netdev@...r.kernel.org
Cc: dsa@...ulusnetworks.com, shm@...ulusnetworks.com,
davem@...emloft.net,
Nikolay Aleksandrov <nikolay@...ulusnetworks.com>
Subject: [PATCH net-next 3/4] vrf: don't check for dstats and rth in uninit path
From: Nikolay Aleksandrov <nikolay@...ulusnetworks.com>
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@...ulusnetworks.com>
---
drivers/net/vrf.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/net/vrf.c b/drivers/net/vrf.c
index 3d7da0c6f827..97605eab14ae 100644
--- a/drivers/net/vrf.c
+++ b/drivers/net/vrf.c
@@ -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;
}
--
2.4.3
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists