summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormanish.rangankar@cavium.com <manish.rangankar@cavium.com>2017-05-19 01:33:21 -0700
committerMartin K. Petersen <martin.petersen@oracle.com>2017-05-23 22:16:43 -0400
commitb19775e4785996503b106e59d9d3a8839e677afd (patch)
tree0ccb182866133f5b2ac902e3b301d4ace21cf1cc
parent3d61a3132212d6b1c8c6914700d5f6456712ac08 (diff)
downloadlinux-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.c2
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)