Skip to content

Commit

Permalink
[PATCH] IB: Eliminate redundant NULL checks
Browse files Browse the repository at this point in the history
IPoIB: Eliminate NULL checks prior to calling kfree

Signed-off-by: Hal Rosenstock <halr@voltaire.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
  • Loading branch information
Hal Rosenstock authored and Roland Dreier committed Aug 27, 2005
1 parent 2a1d9b7 commit 92a6b34
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions drivers/infiniband/ulp/ipoib/ipoib_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 92a6b34

Please sign in to comment.