scsi: qedi: Fix endpoint NULL panic during recovery.
authormanish.rangankar@cavium.com <manish.rangankar@cavium.com>
Fri, 19 May 2017 08:33:21 +0000 (01:33 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 24 May 2017 02:16:43 +0000 (22:16 -0400)
Signed-off-by: Manish Rangankar <manish.rangankar@cavium.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/qedi/qedi_fw.c

index d6978cb..8bc7ee1 100644 (file)
@@ -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)