diff mbox

sparc: remove some pointless conditionals before kfree()

Message ID 49D1D906.4060602@cn.fujitsu.com
State Accepted
Delegated to: David Miller
Headers show

Commit Message

Wei Yongjun March 31, 2009, 8:49 a.m. UTC
Remove some pointless conditionals before kfree().

Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
---
 arch/sparc/kernel/ldc.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

Comments

David Miller April 15, 2009, 10:05 a.m. UTC | #1
From: Wei Yongjun <yjwei@cn.fujitsu.com>
Date: Tue, 31 Mar 2009 16:49:10 +0800

> Remove some pointless conditionals before kfree().
> 
> Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>

Applied, thank you.
--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/arch/sparc/kernel/ldc.c b/arch/sparc/kernel/ldc.c
index 6ce5d25..adf5f27 100644
--- a/arch/sparc/kernel/ldc.c
+++ b/arch/sparc/kernel/ldc.c
@@ -1183,8 +1183,7 @@  out_free_txq:
 	free_queue(lp->tx_num_entries, lp->tx_base);
 
 out_free_mssbuf:
-	if (mssbuf)
-		kfree(mssbuf);
+	kfree(mssbuf);
 
 out_free_iommu:
 	ldc_iommu_release(lp);
@@ -1217,8 +1216,7 @@  void ldc_free(struct ldc_channel *lp)
 
 	hlist_del(&lp->list);
 
-	if (lp->mssbuf)
-		kfree(lp->mssbuf);
+	kfree(lp->mssbuf);
 
 	ldc_iommu_release(lp);