From: Saurav Kashyap Date: Mon, 22 Apr 2019 05:44:56 +0000 (-0700) Subject: scsi: qedf: Check for fcoe_libfc_config failure X-Git-Tag: v5.2-rc1~130^2~43 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f4eecabe743a6aca463bae85c5f9551cfe9d4870;p=thirdparty%2Fkernel%2Flinux.git scsi: qedf: Check for fcoe_libfc_config failure Print the fcoe_libfc_config failure and return proper failure. Signed-off-by: Saurav Kashyap Signed-off-by: Chad Dupuis Signed-off-by: Martin K. Petersen --- diff --git a/drivers/scsi/qedf/qedf_main.c b/drivers/scsi/qedf/qedf_main.c index ffaf8f9b747f5..a527b9b1f9af6 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,