diff options
author | manish.rangankar@cavium.com <manish.rangankar@cavium.com> | 2017-05-19 01:33:21 -0700 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2017-05-23 22:16:43 -0400 |
commit | b19775e4785996503b106e59d9d3a8839e677afd (patch) | |
tree | 0ccb182866133f5b2ac902e3b301d4ace21cf1cc | |
parent | 3d61a3132212d6b1c8c6914700d5f6456712ac08 (diff) | |
download | linux-b19775e4785996503b106e59d9d3a8839e677afd.tar.bz2 |
scsi: qedi: Fix endpoint NULL panic during recovery.
Signed-off-by: Manish Rangankar <manish.rangankar@cavium.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-rw-r--r-- | drivers/scsi/qedi/qedi_fw.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/scsi/qedi/qedi_fw.c b/drivers/scsi/qedi/qedi_fw.c index d6978cbc56f0..8bc7ee1a8ca8 100644 --- a/drivers/scsi/qedi/qedi_fw.c +++ b/drivers/scsi/qedi/qedi_fw.c @@ -1494,6 +1494,8 @@ static int qedi_send_iscsi_tmf(struct qedi_conn *qedi_conn, tmf_hdr = (struct iscsi_tm *)mtask->hdr; qedi_cmd = (struct qedi_cmd *)mtask->dd_data; ep = qedi_conn->ep; + if (!ep) + return -ENODEV; tid = qedi_get_task_idx(qedi); if (tid == -1) |