Patchwork myri10ge: Remove redundant NULL check before kfree

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

Comments

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

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

Patch

diff --git a/drivers/net/ethernet/myricom/myri10ge/myri10ge.c b/drivers/net/ethernet/myricom/myri10ge/myri10ge.c
index 4f9937e..2f9efe8 100644
--- a/drivers/net/ethernet/myricom/myri10ge/myri10ge.c
+++ b/drivers/net/ethernet/myricom/myri10ge/myri10ge.c
@@ -4005,8 +4005,7 @@  static void myri10ge_remove(struct pci_dev *pdev)
 		mtrr_del(mgp->mtrr, mgp->iomem_base, mgp->board_span);
 #endif
 	myri10ge_free_slices(mgp);
-	if (mgp->msix_vectors != NULL)
-		kfree(mgp->msix_vectors);
+	kfree(mgp->msix_vectors);
 	dma_free_coherent(&pdev->dev, sizeof(*mgp->cmd),
 			  mgp->cmd, mgp->cmd_bus);