mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-03 00:54:09 +08:00
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>
This commit is contained in:
parent
85cffefa09
commit
e752a04e1b
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user