Patchwork xilinx: ll_temac: Remove redundant NULL check before kfree

login
register
mail settings
Submitter Syam Sidhardhan
Date Feb. 26, 2013, 7:59 p.m.
Message ID <1361908777-3340-1-git-send-email-s.syam@samsung.com>
Download mbox | patch
Permalink /patch/223386/
State Deferred
Delegated to: David Miller
Headers show

Comments

Syam Sidhardhan - Feb. 26, 2013, 7:59 p.m.
kfree on NULL pointer is a no-op.

Signed-off-by: Syam Sidhardhan <s.syam@samsung.com>
---
 drivers/net/ethernet/xilinx/ll_temac_main.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Patch

diff --git a/drivers/net/ethernet/xilinx/ll_temac_main.c b/drivers/net/ethernet/xilinx/ll_temac_main.c
index 9fc2ada..200a341 100644
--- a/drivers/net/ethernet/xilinx/ll_temac_main.c
+++ b/drivers/net/ethernet/xilinx/ll_temac_main.c
@@ -224,8 +224,7 @@  static void temac_dma_bd_release(struct net_device *ndev)
 		dma_free_coherent(ndev->dev.parent,
 				sizeof(*lp->tx_bd_v) * TX_BD_NUM,
 				lp->tx_bd_v, lp->tx_bd_p);
-	if (lp->rx_skb)
-		kfree(lp->rx_skb);
+	kfree(lp->rx_skb);
 }
 
 /**