]> err.no Git - linux-2.6/commitdiff
[PATCH] IB: Eliminate redundant NULL checks
authorHal Rosenstock <halr@voltaire.com>
Sun, 14 Aug 2005 03:50:27 +0000 (20:50 -0700)
committerRoland Dreier <rolandd@cisco.com>
Sat, 27 Aug 2005 03:37:35 +0000 (20:37 -0700)
IPoIB: Eliminate NULL checks prior to calling kfree

Signed-off-by: Hal Rosenstock <halr@voltaire.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/ulp/ipoib/ipoib_main.c

index b07383e5c76ae13af5f39c38df9f320d33188657..d4300e4a36d8a8f6ef7c8fb5ac9097f7cd4593a0 100644 (file)
@@ -782,15 +782,11 @@ void ipoib_dev_cleanup(struct net_device *dev)
 
        ipoib_ib_dev_cleanup(dev);
 
-       if (priv->rx_ring) {
-               kfree(priv->rx_ring);
-               priv->rx_ring = NULL;
-       }
+       kfree(priv->rx_ring);
+       kfree(priv->tx_ring);
 
-       if (priv->tx_ring) {
-               kfree(priv->tx_ring);
-               priv->tx_ring = NULL;
-       }
+       priv->rx_ring = NULL;
+       priv->tx_ring = NULL;
 }
 
 static void ipoib_setup(struct net_device *dev)