[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>
This commit is contained in:
Hal Rosenstock 2005-08-13 20:50:27 -07:00 committed by Roland Dreier
parent 2a1d9b7f09
commit 92a6b34bf4
1 changed files with 4 additions and 8 deletions

View 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)