[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:
parent
2a1d9b7f09
commit
92a6b34bf4
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue