From patchwork Sun Sep 13 12:15:13 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julia Lawall X-Patchwork-Id: 517544 X-Patchwork-Delegate: jeffrey.t.kirsher@intel.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ozlabs.org (Postfix) with ESMTP id CB477140779 for ; Tue, 15 Sep 2015 04:18:14 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 080A526EC0; Mon, 14 Sep 2015 18:18:14 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id mAjfx8zV8PS9; Mon, 14 Sep 2015 18:18:11 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id DE97F26F23; Mon, 14 Sep 2015 18:18:11 +0000 (UTC) X-Original-To: intel-wired-lan@lists.osuosl.org Delivered-To: intel-wired-lan@lists.osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 1F9801C11C5 for ; Sun, 13 Sep 2015 12:26:02 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 199442FB21 for ; Sun, 13 Sep 2015 12:26:02 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7ayeniJCzgr7 for ; Sun, 13 Sep 2015 12:26:00 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by silver.osuosl.org (Postfix) with ESMTPS id CFC772FB57 for ; Sun, 13 Sep 2015 12:25:59 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.17,522,1437429600"; d="scan'208";a="145607441" Received: from palace.rsr.lip6.fr (HELO localhost.localdomain) ([132.227.105.202]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 13 Sep 2015 14:25:57 +0200 From: Julia Lawall To: Jeff Kirsher Date: Sun, 13 Sep 2015 14:15:13 +0200 Message-Id: <1442146532-9100-21-git-send-email-Julia.Lawall@lip6.fr> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1442146532-9100-1-git-send-email-Julia.Lawall@lip6.fr> References: <1442146532-9100-1-git-send-email-Julia.Lawall@lip6.fr> X-Mailman-Approved-At: Mon, 14 Sep 2015 18:18:10 +0000 Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org, sergey.senozhatsky@gmail.com, intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org Subject: [Intel-wired-lan] [PATCH 20/39] ixgbe: drop null test before destroy functions X-BeenThere: intel-wired-lan@lists.osuosl.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-wired-lan-bounces@lists.osuosl.org Sender: "Intel-wired-lan" Remove unneeded NULL test. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression x; @@ -if (x != NULL) \(kmem_cache_destroy\|mempool_destroy\|dma_pool_destroy\)(x); // Signed-off-by: Julia Lawall --- drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.c index 631c603..5f98870 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.c @@ -620,8 +620,7 @@ static void ixgbe_fcoe_dma_pool_free(struct ixgbe_fcoe *fcoe, unsigned int cpu) struct ixgbe_fcoe_ddp_pool *ddp_pool; ddp_pool = per_cpu_ptr(fcoe->ddp_pool, cpu); - if (ddp_pool->pool) - dma_pool_destroy(ddp_pool->pool); + dma_pool_destroy(ddp_pool->pool); ddp_pool->pool = NULL; }