diff mbox

fm10k:Fix error handling in the function fm10k_resume

Message ID 1445098842-28260-1-git-send-email-xerofoify@gmail.com
State Superseded
Headers show

Commit Message

Nicholas Krause Oct. 17, 2015, 4:20 p.m. UTC
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 <xerofoify@gmail.com>
---
 drivers/net/ethernet/intel/fm10k/fm10k_pci.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Singh, Krishneil K Oct. 28, 2015, 10:40 p.m. UTC | #1
-----Original Message-----
From: Intel-wired-lan [mailto:intel-wired-lan-bounces@lists.osuosl.org] On Behalf Of Nicholas Krause
Sent: Saturday, October 17, 2015 9:21 AM
To: Kirsher, Jeffrey T <jeffrey.t.kirsher@intel.com>
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

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 <xerofoify@gmail.com>
---

Tested-by: Krishneil SIngh <krishneil.k.singh@intel.com>
diff mbox

Patch

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);
 	}