From: Gleb C. <lna...@ya...> - 2025-08-05 15:23:33
|
Commit: d0b970f GitHub URL: https://github.com/SCST-project/scst/commit/d0b970fad01e2869ed3fa05e5803fcdfa0e20636 Author: Gleb Chesnokov Date: 2025-08-05T18:15:49+03:00 Log Message: ----------- qla2x00t-32gbit: Fix DMA mapping test in qla24xx_get_port_database() dma_map_XXX() functions return as error values DMA_MAPPING_ERROR which is often ~0. The error value should be tested with dma_mapping_error() like it was done in qla26xx_dport_diagnostics(). Fixes: 818c7f87a177 ("scsi: qla2xxx: Add changes in preparation for vendor extended FDMI/RDP") Signed-off-by: Thomas Fourier <fou...@gm...> Link: https://lore.kernel.org/r/202...@gm... Signed-off-by: Martin K. Petersen <mar...@or...> [ commit c3b214719a87 upstream ] Modified Paths: -------------- qla2x00t-32gbit/qla_mbx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) =================================================================== diff --git a/qla2x00t-32gbit/qla_mbx.c b/qla2x00t-32gbit/qla_mbx.c index 0cd6f3e..13b6cb1 100644 --- a/qla2x00t-32gbit/qla_mbx.c +++ b/qla2x00t-32gbit/qla_mbx.c @@ -2147,7 +2147,7 @@ qla24xx_get_port_database(scsi_qla_host_t *vha, u16 nport_handle, pdb_dma = dma_map_single(&vha->hw->pdev->dev, pdb, sizeof(*pdb), DMA_FROM_DEVICE); - if (!pdb_dma) { + if (dma_mapping_error(&vha->hw->pdev->dev, pdb_dma)) { ql_log(ql_log_warn, vha, 0x1116, "Failed to map dma buffer.\n"); return QLA_MEMORY_ALLOC_FAILED; } |