Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 92a6b34b authored by Hal Rosenstock's avatar Hal Rosenstock Committed by Roland Dreier
Browse files

[PATCH] IB: Eliminate redundant NULL checks



IPoIB: Eliminate NULL checks prior to calling kfree

Signed-off-by: default avatarHal Rosenstock <halr@voltaire.com>
Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
parent 2a1d9b7f
Loading
Loading
Loading
Loading
+4 −8
Original line number Diff line number Diff line
@@ -782,16 +782,12 @@ 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;
	}

	if (priv->tx_ring) {
	kfree(priv->tx_ring);

	priv->rx_ring = NULL;
	priv->tx_ring = NULL;
}
}

static void ipoib_setup(struct net_device *dev)
{