From patchwork Sat Oct 17 16:20:42 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Krause X-Patchwork-Id: 532237 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ozlabs.org (Postfix) with ESMTP id 5FC2C1402C4 for ; Mon, 19 Oct 2015 22:34:24 +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=iWvz6CXJ; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 4A21E8A5B9; Mon, 19 Oct 2015 11:34:23 +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 HD+YCE3M-E4w; Mon, 19 Oct 2015 11:34:22 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id B273E88FF1; Mon, 19 Oct 2015 11:34:22 +0000 (UTC) X-Original-To: intel-wired-lan@lists.osuosl.org Delivered-To: intel-wired-lan@lists.osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id A7E771CED09 for ; Sat, 17 Oct 2015 16:20:49 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id A169D877A9 for ; Sat, 17 Oct 2015 16:20:49 +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 uyoaOjhemhUP for ; Sat, 17 Oct 2015 16:20:47 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-io0-f195.google.com (mail-io0-f195.google.com [209.85.223.195]) by hemlock.osuosl.org (Postfix) with ESMTPS id A9F6E877A1 for ; Sat, 17 Oct 2015 16:20:47 +0000 (UTC) Received: by ioii196 with SMTP id i196so14574828ioi.2 for ; Sat, 17 Oct 2015 09:20:47 -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=0cXJ1hi+WHtJpPiZTC09LWoPW7UsulUhatP0tIR0J7I=; b=iWvz6CXJR8p8BG1DalOc60PZJ0fQR/llfPaxTMERrN8ekl4910YJ+UsncmNnq9Dw1S YT3hG9iL+yNsURULlSRYAMzm0Y8sxhrNH0gWr0IBLQqTvl00HBqT8MfHiccHPNHX8Z2V PFaayHg2gza/fjoqfxmWwGGftiZK6mVWfCJLoSDQa5I2aPJyAV11ea1Mis3iZX84wBG8 CZbJ5Z435DOwF02KUwi0B1rhEqPsl5PFlpnX5ay7wgqr7OgDG1o8+UdbhfkB94m/WYdg 665Lj1g5JzvpE/TZeaDYeVrtfF5wU3TCJzxNOmj8h6DuUvVkdqWF6jvOmcBG8Kde5xmq Lo1g== X-Received: by 10.107.30.149 with SMTP id e143mr19813023ioe.121.1445098847150; Sat, 17 Oct 2015 09:20:47 -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 f24sm6047451ioi.22.2015.10.17.09.20.45 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 17 Oct 2015 09:20:46 -0700 (PDT) From: Nicholas Krause To: jeffrey.t.kirsher@intel.com Date: Sat, 17 Oct 2015 12:20:42 -0400 Message-Id: <1445098842-28260-1-git-send-email-xerofoify@gmail.com> X-Mailer: git-send-email 2.1.4 X-Mailman-Approved-At: Mon, 19 Oct 2015 11:34:21 +0000 Cc: linux-kernel@vger.kernel.org, intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org Subject: [Intel-wired-lan] [PATCH] fm10k:Fix error handling in the function fm10k_resume 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 fixes error handling to proper check if the call to the function fm10k_mbx_request_irq has failed by returning a error code and if so return immediately to the caller of fm10k_resume to properly signal a failure has occurred when accepting to resume this network Signed-off-by: Nicholas Krause Signed-off-by: Nicholas Krause Tested-by: Krishneil SIngh --- drivers/net/ethernet/intel/fm10k/fm10k_pci.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_pci.c b/drivers/net/ethernet/intel/fm10k/fm10k_pci.c index ce53ff2..cb3bfc8 100644 --- a/drivers/net/ethernet/intel/fm10k/fm10k_pci.c +++ b/drivers/net/ethernet/intel/fm10k/fm10k_pci.c @@ -1973,7 +1973,9 @@ static int fm10k_resume(struct pci_dev *pdev) err = fm10k_init_queueing_scheme(interface); if (!err) { - fm10k_mbx_request_irq(interface); + err = fm10k_mbx_request_irq(interface); + if (err) + return err; if (netif_running(netdev)) err = fm10k_open(netdev); }