mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-05 19:31:57 -04:00
scsi: qla4xxx: Fix missing DMA mapping error in qla4xxx_alloc_pdu()
[ Upstream commit 00f452a1b084efbe8dcb60a29860527944a002a1 ]
dma_map_XXX() can fail and should be tested for errors with
dma_mapping_error().
Fixes: b3a271a94d ("[SCSI] qla4xxx: support iscsiadm session mgmt")
Signed-off-by: Thomas Fourier <fourier.thomas@gmail.com>
Link: https://lore.kernel.org/r/20250618071742.21822-2-fourier.thomas@gmail.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
8785701fd7
commit
5e6d24e635
1 changed files with 2 additions and 0 deletions
|
|
@ -3394,6 +3394,8 @@ static int qla4xxx_alloc_pdu(struct iscsi_task *task, uint8_t opcode)
|
|||
task_data->data_dma = dma_map_single(&ha->pdev->dev, task->data,
|
||||
task->data_count,
|
||||
DMA_TO_DEVICE);
|
||||
if (dma_mapping_error(&ha->pdev->dev, task_data->data_dma))
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
DEBUG2(ql4_printk(KERN_INFO, ha, "%s: MaxRecvLen %u, iscsi hrd %d\n",
|
||||
|
|
|
|||
Loading…
Reference in a new issue