mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
qla4xxx: check the return value of dma_alloc_coherent()
the qla4xxx_alloc_fw_dump() calls dma_alloc_coherent() but does not check its return value. Signed-off-by: Maurizio Lombardi <[email protected]> Acked-By: Nilesh Javali <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]>
This commit is contained in:
parent
4d0a21f1fd
commit
a5c277ec5a
1 changed files with 6 additions and 0 deletions
|
|
@ -334,6 +334,12 @@ void qla4xxx_alloc_fw_dump(struct scsi_qla_host *ha)
|
|||
/* Allocate memory for saving the template */
|
||||
md_tmp = dma_alloc_coherent(&ha->pdev->dev, ha->fw_dump_tmplt_size,
|
||||
&md_tmp_dma, GFP_KERNEL);
|
||||
if (!md_tmp) {
|
||||
ql4_printk(KERN_INFO, ha,
|
||||
"scsi%ld: Failed to allocate DMA memory\n",
|
||||
ha->host_no);
|
||||
return;
|
||||
}
|
||||
|
||||
/* Request template */
|
||||
status = qla4xxx_get_minidump_template(ha, md_tmp_dma);
|
||||
|
|
|
|||
Loading…
Reference in a new issue