diff options
author | Bart Van Assche <bvanassche@acm.org> | 2019-08-08 20:02:07 -0700 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2019-08-12 21:34:08 -0400 |
commit | e752a04e1bd14ccff2762605004f515ad9b0d48a (patch) | |
tree | b6677af3fec67477f4de8f8aecc37663d9d9085c /drivers | |
parent | 85cffefa09e448906a6f0bc20f422d75a18675bd (diff) |
scsi: qla2xxx: Make qlt_handle_abts_completion() more robust
Avoid that this function crashes if mcmd == NULL.
Cc: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Tested-by: Himanshu Madhani <hmadhani@marvell.com>
Reviewed-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_target.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/qla2xxx/qla_target.c b/drivers/scsi/qla2xxx/qla_target.c index d25c3fa43601..cc0c99b5f3fb 100644 --- a/drivers/scsi/qla2xxx/qla_target.c +++ b/drivers/scsi/qla2xxx/qla_target.c @@ -5731,7 +5731,7 @@ static void qlt_handle_abts_completion(struct scsi_qla_host *vha, entry->error_subcode2); ha->tgt.tgt_ops->free_mcmd(mcmd); } - } else { + } else if (mcmd) { ha->tgt.tgt_ops->free_mcmd(mcmd); } } |