Blob Blame History Raw
From: Saurav Kashyap <saurav.kashyap@cavium.com>
Date: Sun, 21 Apr 2019 22:44:56 -0700
Subject: scsi: qedf: Check for fcoe_libfc_config failure
Git-commit: f4eecabe743a6aca463bae85c5f9551cfe9d4870
Patch-mainline: v5.2-rc1
References: bsc#1136467 jsc#SLE-4694

Print the fcoe_libfc_config failure and return proper failure.

Signed-off-by: Saurav Kashyap <saurav.kashyap@cavium.com>
Signed-off-by: Chad Dupuis <chad.dupuis@cavium.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Acked-by: Lee Duncan <lduncan@suse.com>
---
 drivers/scsi/qedf/qedf_main.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

--- a/drivers/scsi/qedf/qedf_main.c
+++ b/drivers/scsi/qedf/qedf_main.c
@@ -1609,7 +1609,11 @@ static int qedf_lport_setup(struct qedf_
 	fc_set_wwnn(lport, qedf->wwnn);
 	fc_set_wwpn(lport, qedf->wwpn);
 
-	fcoe_libfc_config(lport, &qedf->ctlr, &qedf_lport_template, 0);
+	if (fcoe_libfc_config(lport, &qedf->ctlr, &qedf_lport_template, 0)) {
+		QEDF_ERR(&qedf->dbg_ctx,
+			 "fcoe_libfc_config failed.\n");
+		return -ENOMEM;
+	}
 
 	/* Allocate the exchange manager */
 	fc_exch_mgr_alloc(lport, FC_CLASS_3, qedf->max_scsi_xid + 1,