Message ID | 20191125165702.1013-2-r.bolshakov@yadro.com (mailing list archive) |
---|---|
State | Accepted |
Commit | f2c9ee54a56995a293efef290657d8a1d80e14ab |
Headers | show |
Series | scsi: qla2xxx: Bug fixes | expand |
On 11/25/19 8:56 AM, Roman Bolshakov wrote: > If ABTS cannot be completed in target mode, the driver attempts to free [ ... ] Reviewed-by: Bart Van Assche <bvanassche@acm.org>
diff --git a/drivers/scsi/qla2xxx/tcm_qla2xxx.c b/drivers/scsi/qla2xxx/tcm_qla2xxx.c index 042a24314edc..bab2073c1f72 100644 --- a/drivers/scsi/qla2xxx/tcm_qla2xxx.c +++ b/drivers/scsi/qla2xxx/tcm_qla2xxx.c @@ -246,6 +246,8 @@ static void tcm_qla2xxx_complete_mcmd(struct work_struct *work) */ static void tcm_qla2xxx_free_mcmd(struct qla_tgt_mgmt_cmd *mcmd) { + if (!mcmd) + return; INIT_WORK(&mcmd->free_work, tcm_qla2xxx_complete_mcmd); queue_work(tcm_qla2xxx_free_wq, &mcmd->free_work); }