From patchwork Tue May 26 20:26:14 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Navet X-Patchwork-Id: 476745 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ozlabs.org (Postfix) with ESMTP id C29F614078C for ; Wed, 27 May 2015 07:23:16 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=fjtQf7XY; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id CE33290E29; Tue, 26 May 2015 21:23:15 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ftThm-LVncw3; Tue, 26 May 2015 21:23:14 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id B769490DC6; Tue, 26 May 2015 21:23:14 +0000 (UTC) X-Original-To: intel-wired-lan@lists.osuosl.org Delivered-To: intel-wired-lan@lists.osuosl.org Received: from hemlock.osuosl.org (hemlock.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id C858A1C1F9B for ; Tue, 26 May 2015 20:19:15 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id C0C4495A63 for ; Tue, 26 May 2015 20:19:15 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id tzI3D2xgQs14 for ; Tue, 26 May 2015 20:19:15 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wi0-f176.google.com (mail-wi0-f176.google.com [209.85.212.176]) by hemlock.osuosl.org (Postfix) with ESMTPS id 0F5DE95A5B for ; Tue, 26 May 2015 20:19:15 +0000 (UTC) Received: by wizo1 with SMTP id o1so3178536wiz.1 for ; Tue, 26 May 2015 13:19:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=WtuQpQlT4AguAZpOL8XjjwQYfg9ZcIOqeyjNmyBeL7A=; b=fjtQf7XYkQkndotJasg0smgZ+rRbsL3de373r3VvSPkicId61+GvK0xbWfxlNb4Cmx GPFBDBp7367vij+XtyiQz/Vk8ZQWUgGfcrjF170lup24MT9trPlYRGEga7rH2CAGquLk fsMYePBNokNmwqxbmIzFrXfkBd4c/NvlsL4q7zPPXUgOiuUHwCyCB4JYJSl87ZCRewi/ DgVgWnyTAlTGZrnFCYpLGnvgFfo6Kyo0nnrU+CMqrc7xAfJAKWPX5cCcZAkM6nOAzp3d 4VbAR4Fe586gh1qH8UVppRPtWkiZPvKxwZV/i3LqntwvywkhBidTeoy8szrWf0q7EJKt PHEw== X-Received: by 10.180.9.111 with SMTP id y15mr43979443wia.18.1432671553529; Tue, 26 May 2015 13:19:13 -0700 (PDT) Received: from paddy.home (ANantes-659-1-18-242.w2-9.abo.wanadoo.fr. [2.9.85.242]) by mx.google.com with ESMTPSA id ex5sm189354wib.2.2015.05.26.13.19.11 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 26 May 2015 13:19:12 -0700 (PDT) From: Laurent Navet To: jeffrey.t.kirsher@intel.com, jesse.brandeburg@intel.com, shannon.nelson@intel.com, carolyn.wyborny@intel.com, donald.c.skidmore@intel.com, matthew.vick@intel.com, john.ronciak@intel.com, mitch.a.williams@intel.com Date: Tue, 26 May 2015 22:26:14 +0200 Message-Id: <1432671974-16704-1-git-send-email-laurent.navet@gmail.com> X-Mailer: git-send-email 2.1.4 X-Mailman-Approved-At: Tue, 26 May 2015 21:23:13 +0000 Cc: netdev@vger.kernel.org, intel-wired-lan@lists.osuosl.org, linux-kernel@vger.kernel.org, Laurent Navet Subject: [Intel-wired-lan] [PATCH] i40e: remove unneeded tests 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" The same code is executed regardless ret_code value, so these tests can be removed. Fix Coverity CID 1268789 and 1268791 Signed-off-by: Laurent Navet --- drivers/net/ethernet/intel/i40e/i40e_hmc.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/net/ethernet/intel/i40e/i40e_hmc.c b/drivers/net/ethernet/intel/i40e/i40e_hmc.c index 9b987cc..eae4248 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_hmc.c +++ b/drivers/net/ethernet/intel/i40e/i40e_hmc.c @@ -298,8 +298,6 @@ i40e_status i40e_remove_sd_bp_new(struct i40e_hw *hw, goto exit; } ret_code = i40e_free_dma_mem(hw, &(sd_entry->u.bp.addr)); - if (ret_code) - goto exit; exit: return ret_code; } @@ -353,8 +351,6 @@ i40e_status i40e_remove_pd_page_new(struct i40e_hw *hw, } /* free memory here */ ret_code = i40e_free_dma_mem(hw, &(sd_entry->u.pd_table.pd_page_addr)); - if (ret_code) - goto exit; exit: return ret_code; }