From: manish.rangankar@cavium.com Date: Fri, 19 May 2017 08:33:21 +0000 (-0700) Subject: scsi: qedi: Fix endpoint NULL panic during recovery. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b19775e4785996503b106e59d9d3a8839e677afd;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git scsi: qedi: Fix endpoint NULL panic during recovery. Signed-off-by: Manish Rangankar Signed-off-by: Martin K. Petersen --- 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)