diff options
author | Saurav Kashyap <skashyap@marvell.com> | 2019-03-26 08:38:57 +0100 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2019-03-28 02:54:53 +0100 |
commit | efc8fe9b6cab7be8043006c5cdeb8e37b4b52df3 (patch) | |
tree | 6ed122955857b326d7bc1c4e3c651e139158e038 | |
parent | scsi: qedf: Correctly handle refcounting of rdata (diff) | |
download | linux-efc8fe9b6cab7be8043006c5cdeb8e37b4b52df3.tar.xz linux-efc8fe9b6cab7be8043006c5cdeb8e37b4b52df3.zip |
scsi: qedf: Fix lport may be used uninitialized warning
- lport was getting used without initialization, initialize it to fix a
warning.
Signed-off-by: Saurav Kashyap <skashyap@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-rw-r--r-- | drivers/scsi/qedf/qedf_io.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/scsi/qedf/qedf_io.c b/drivers/scsi/qedf/qedf_io.c index b359ae3b78b5..51378e51d8e4 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; |