From patchwork Tue Mar 31 08:49:10 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 25378 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by ozlabs.org (Postfix) with ESMTP id 677B3DDE00 for ; Tue, 31 Mar 2009 19:50:27 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750988AbZCaIuY (ORCPT ); Tue, 31 Mar 2009 04:50:24 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1750928AbZCaIuY (ORCPT ); Tue, 31 Mar 2009 04:50:24 -0400 Received: from cn.fujitsu.com ([222.73.24.84]:58412 "EHLO song.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1750988AbZCaIuX (ORCPT ); Tue, 31 Mar 2009 04:50:23 -0400 Received: from tang.cn.fujitsu.com (tang.cn.fujitsu.com [10.167.250.3]) by song.cn.fujitsu.com (Postfix) with ESMTP id 0A9D2170172; Tue, 31 Mar 2009 17:28:52 +0800 (CST) Received: from fnst.cn.fujitsu.com (localhost.localdomain [127.0.0.1]) by tang.cn.fujitsu.com (8.13.1/8.13.1) with ESMTP id n2V8qp6G019279; Tue, 31 Mar 2009 16:52:51 +0800 Received: from [127.0.0.1] (unknown [10.167.141.76]) by fnst.cn.fujitsu.com (Postfix) with ESMTP id 1D69ED401A; Tue, 31 Mar 2009 16:54:34 +0800 (CST) Message-ID: <49D1D906.4060602@cn.fujitsu.com> Date: Tue, 31 Mar 2009 16:49:10 +0800 From: Wei Yongjun User-Agent: Thunderbird 2.0.0.6 (Windows/20070728) MIME-Version: 1.0 To: sparclinux@vger.kernel.org, "David S. Miller" Subject: [PATCH] sparc: remove some pointless conditionals before kfree() Sender: sparclinux-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: sparclinux@vger.kernel.org Remove some pointless conditionals before kfree(). Signed-off-by: Wei Yongjun --- arch/sparc/kernel/ldc.c | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-) 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);