summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQuinn Tran <quinn.tran@cavium.com>2018-08-08 06:39:52 +0300
committerMartin K. Petersen <martin.petersen@oracle.com>2018-08-09 04:38:26 +0300
commite9f7be0c4316a0ea1c47b1e800baa58fb937096c (patch)
treeea057fc21e3df1d7a1e832861c10275f97d05dbc
parentd98e000cc79e740f0c9e2dee59cd4b12a2f11a52 (diff)
downloadlinux-e9f7be0c4316a0ea1c47b1e800baa58fb937096c.tar.xz
scsi: qla2xxx: Fix issue reported by static checker for qla2x00_els_dcmd2_sp_done()
This patch fixes following Smatch complaint: drivers/scsi/qla2xxx/qla_iocb.c:2647 qla2x00_els_dcmd2_sp_done() error: we previously assumed 'e' could be null (see line 2631) Fixes: 8777e4314d39 ("scsi: qla2xxx: Migrate NVME N2N handling into state machine") Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Quinn Tran <quinn.tran@cavium.com> Signed-off-by: Himanshu Madhani <himanshu.madhani@cavium.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-rw-r--r--drivers/scsi/qla2xxx/qla_iocb.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/scsi/qla2xxx/qla_iocb.c b/drivers/scsi/qla2xxx/qla_iocb.c
index 059f2c9dc192..213321295753 100644
--- a/drivers/scsi/qla2xxx/qla_iocb.c
+++ b/drivers/scsi/qla2xxx/qla_iocb.c
@@ -2642,6 +2642,7 @@ qla2x00_els_dcmd2_sp_done(void *ptr, int res)
elsio->u.els_plogi.els_resp_pyld,
elsio->u.els_plogi.els_resp_pyld_dma);
sp->free(sp);
+ return;
}
e->u.iosb.sp = sp;
qla2x00_post_work(vha, e);