From patchwork Wed Oct 28 03:03:00 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Krause X-Patchwork-Id: 537320 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ozlabs.org (Postfix) with ESMTP id C54E61402DD for ; Wed, 28 Oct 2015 23:43:03 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=PiUZf6aX; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id DE61D8B1CF; Wed, 28 Oct 2015 12:43:02 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Y8tfqJ3ProDy; Wed, 28 Oct 2015 12:43:02 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 76B2687503; Wed, 28 Oct 2015 12:43:02 +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 548F71C0FB4 for ; Wed, 28 Oct 2015 03:03:07 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 4D439307FB for ; Wed, 28 Oct 2015 03:03:07 +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 zrZ3czhyvvDa for ; Wed, 28 Oct 2015 03:03:06 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-qk0-f181.google.com (mail-qk0-f181.google.com [209.85.220.181]) by silver.osuosl.org (Postfix) with ESMTPS id A6A682FCF1 for ; Wed, 28 Oct 2015 03:03:06 +0000 (UTC) Received: by qkbl190 with SMTP id l190so130460673qkb.2 for ; Tue, 27 Oct 2015 20:03:06 -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=cxqbVzb8lXv5F0DV42Ndd6luR0ySM6mZnrac5h+WIHo=; b=PiUZf6aX5VI9XBKdJqfWM6zp+zP0Xll8ah6Im6Bm6BCKY6SUeq1Kd0sappt/0RNM0F ISco4nxE+dOrj6zoYjmh/xUx4wgWbQSZeqNsOKxdPb+ZY0mnVcKgXY981WPXD/5/5yr8 pF55LZDABtObosJgcuK4WcBLxO5410PQMR4k2ig1+hn4L9kddISfSsN0PZr3Vo65xOvW 3MVqnT7ofMCIcmr3hLc3Fn0H88eFmCa9K4rIR6yB49yl7SFyi4MtQVhYSvAn8CBw17Ri zndPHRmRHwvu4E0Qe0s9VJJP8EXYlf4Qj9dB1l2yiT6ES3Ap8/yChdXYv2FfBQzEy3ps UAmA== X-Received: by 10.55.198.217 with SMTP id s86mr54628437qkl.75.1446001385838; Tue, 27 Oct 2015 20:03:05 -0700 (PDT) Received: from nick-System-Product-Name.hitronhub.home (CPEbc4dfb2691f3-CMbc4dfb2691f0.cpe.net.cable.rogers.com. [99.231.110.121]) by smtp.googlemail.com with ESMTPSA id c103sm821117qgd.36.2015.10.27.20.03.04 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 27 Oct 2015 20:03:05 -0700 (PDT) From: Nicholas Krause To: jeffrey.t.kirsher@intel.com Date: Tue, 27 Oct 2015 23:03:00 -0400 Message-Id: <1446001380-27744-1-git-send-email-xerofoify@gmail.com> X-Mailer: git-send-email 2.1.4 X-Mailman-Approved-At: Wed, 28 Oct 2015 12:43:00 +0000 Cc: linux-kernel@vger.kernel.org, intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org Subject: [Intel-wired-lan] [PATCH] i40evf:Add missing error check in the function i40evf_init_task 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" This adds the missing error check in the function i40evf_init_task for checking the return value of the call to the function i40evf_map_rings_to_vectors and if this function call does indeed return a error code jump immediately to the goto label err_sw_init in order to cleanup before returning to the caller rather then continuing the function, i40evf_map_rings_to_vector's intended work after this non recoverable failed function call. Signed-off-by: Nicholas Krause --- drivers/net/ethernet/intel/i40evf/i40evf_main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/intel/i40evf/i40evf_main.c b/drivers/net/ethernet/intel/i40evf/i40evf_main.c index e85849b..cf1f3fd 100644 --- a/drivers/net/ethernet/intel/i40evf/i40evf_main.c +++ b/drivers/net/ethernet/intel/i40evf/i40evf_main.c @@ -2264,7 +2264,9 @@ static void i40evf_init_task(struct work_struct *work) err = i40evf_init_interrupt_scheme(adapter); if (err) goto err_sw_init; - i40evf_map_rings_to_vectors(adapter); + err = i40evf_map_rings_to_vectors(adapter); + if (err) + goto err_sw_init; if (!RSS_AQ(adapter)) i40evf_configure_rss(adapter); err = i40evf_request_misc_irq(adapter);