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>
This commit is contained in:
Saurav Kashyap 2019-04-21 22:44:56 -07:00 committed by Martin K. Petersen
parent 8b95b99c1a
commit f4eecabe74
1 changed files with 5 additions and 1 deletions

View File

@ -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,