diff options
author | Saurav Kashyap | 2019-04-21 22:44:56 -0700 |
---|---|---|
committer | Martin K. Petersen | 2019-04-29 08:34:09 -0400 |
commit | f4eecabe743a6aca463bae85c5f9551cfe9d4870 (patch) | |
tree | 563a1a43e9393f1afe06474f2ddd6111d7ef44b2 /drivers/scsi/qedf | |
parent | 8b95b99c1aafb72f19c583a6864149cf074f5e7a (diff) |
scsi: qedf: Check for fcoe_libfc_config failure
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>
Diffstat (limited to 'drivers/scsi/qedf')
-rw-r--r-- | drivers/scsi/qedf/qedf_main.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/scsi/qedf/qedf_main.c b/drivers/scsi/qedf/qedf_main.c index ffaf8f9b747f..a527b9b1f9af 100644 --- a/drivers/scsi/qedf/qedf_main.c +++ b/drivers/scsi/qedf/qedf_main.c @@ -1618,7 +1618,11 @@ static int qedf_lport_setup(struct qedf_ctx *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, FCOE_PARAMS_NUM_TASKS, |