1
0
Fork 0

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>
pull/68/head
Bart Van Assche 2019-08-08 20:02:07 -07:00 committed by Martin K. Petersen
parent 85cffefa09
commit e752a04e1b
1 changed files with 1 additions and 1 deletions

View File

@ -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);
}
}