提交 92a6b34b 编写于 作者: H Hal Rosenstock 提交者: Roland Dreier

[PATCH] IB: Eliminate redundant NULL checks

IPoIB: Eliminate NULL checks prior to calling kfree
Signed-off-by: NHal Rosenstock <halr@voltaire.com>
Signed-off-by: NRoland Dreier <rolandd@cisco.com>
上级 2a1d9b7f
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册