diff mbox series

[25/26] qedf: Fix lport may be used uninitialezed warning.

Message ID 20190305105901.13185-26-skashyap@marvell.com (mailing list archive)
State Superseded
Headers show
Series qedf: Misc fixes for the driver. | expand

Commit Message

Saurav Kashyap March 5, 2019, 10:59 a.m. UTC
- lport was getting used without initialization,
  initialize it to fix a warning.

Signed-off-by: Saurav Kashyap <skashyap@marvell.com>
---
 drivers/scsi/qedf/qedf_io.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/drivers/scsi/qedf/qedf_io.c b/drivers/scsi/qedf/qedf_io.c
index b9877f1..ed149d5 100644
--- a/drivers/scsi/qedf/qedf_io.c
+++ b/drivers/scsi/qedf/qedf_io.c
@@ -2356,7 +2356,7 @@  int qedf_initiate_tmf(struct scsi_cmnd *sc_cmd, u8 tm_flags)
 	struct fc_rport_libfc_priv *rp = rport->dd_data;
 	struct qedf_rport *fcport = (struct qedf_rport *)&rp[1];
 	struct qedf_ctx *qedf;
-	struct fc_lport *lport;
+	struct fc_lport *lport = shost_priv(sc_cmd->device->host);
 	int rc = SUCCESS;
 	int rval;
 	struct qedf_ioreq *io_req = NULL;
@@ -2410,8 +2410,6 @@  int qedf_initiate_tmf(struct scsi_cmnd *sc_cmd, u8 tm_flags)
 		goto tmf_err;
 	}
 
-	lport = qedf->lport;
-
 	if (test_bit(QEDF_RPORT_UPLOADING_CONNECTION, &fcport->flags)) {
 		QEDF_ERR(&qedf->dbg_ctx, "Connection is getting uploaded.\n");
 		rc = SUCCESS;