aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/ulp
diff options
context:
space:
mode:
authorHal Rosenstock <halr@voltaire.com>2005-08-13 23:50:27 -0400
committerRoland Dreier <rolandd@cisco.com>2005-08-26 23:37:35 -0400
commit92a6b34bf4d0d11c54b2a6bdd6240f98cb326200 (patch)
tree847c73d3cf07ec28357579417070f8952952e253 /drivers/infiniband/ulp
parent2a1d9b7f09aaaacf235656cb32a40ba2c79590b3 (diff)
[PATCH] IB: Eliminate redundant NULL checks
IPoIB: Eliminate NULL checks prior to calling kfree Signed-off-by: Hal Rosenstock <halr@voltaire.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/ulp')
-rw-r--r--drivers/infiniband/ulp/ipoib/ipoib_main.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c
index b07383e5c76a..d4300e4a36d8 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_main.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c
@@ -782,15 +782,11 @@ void ipoib_dev_cleanup(struct net_device *dev)
782 782
783 ipoib_ib_dev_cleanup(dev); 783 ipoib_ib_dev_cleanup(dev);
784 784
785 if (priv->rx_ring) { 785 kfree(priv->rx_ring);
786 kfree(priv->rx_ring); 786 kfree(priv->tx_ring);
787 priv->rx_ring = NULL;
788 }
789 787
790 if (priv->tx_ring) { 788 priv->rx_ring = NULL;
791 kfree(priv->tx_ring); 789 priv->tx_ring = NULL;
792 priv->tx_ring = NULL;
793 }
794} 790}
795 791
796static void ipoib_setup(struct net_device *dev) 792static void ipoib_setup(struct net_device *dev)