mirror-linux/drivers/ufs/core
Alok Tiwari 5cb782ff3c scsi: ufs: mcq: Fix memory allocation checks for SQE and CQE
Previous checks incorrectly tested the DMA addresses (dma_handle) for
NULL. Since dma_alloc_coherent() returns the CPU (virtual) address, the
NULL check should be performed on the *_base_addr pointer to correctly
detect allocation failures.

Update the checks to validate sqe_base_addr and cqe_base_addr instead of
sqe_dma_addr and cqe_dma_addr.

Fixes: 4682abfae2 ("scsi: ufs: core: mcq: Allocate memory for MCQ mode")
Signed-off-by: Alok Tiwari <alok.a.tiwari@oracle.com>
Reviewed-by: Alim Akhtar <alim.akhtar@samsung.com>
Reviewed-by: Manivannan Sadhasivam <mani@kernel.org>
Reviewed-by: Peter Wang <peter.wang@mediatek.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2025-09-09 22:38:38 -04:00
..
Kconfig scsi: ufs: core: Remove HPB support 2023-07-23 16:40:39 -04:00
Makefile scsi: ufs: core: Remove HPB support 2023-07-23 16:40:39 -04:00
ufs-debugfs.c
ufs-debugfs.h
ufs-fault-injection.c fault-inject: improve build for CONFIG_FAULT_INJECTION=n 2024-09-01 20:43:33 -07:00
ufs-fault-injection.h scsi: ufs: core: Make fault injection dynamically configurable per HBA 2023-11-24 19:23:35 -05:00
ufs-hwmon.c scsi: ufs: Rename a function argument 2023-07-31 15:17:50 -04:00
ufs-mcq.c scsi: ufs: mcq: Fix memory allocation checks for SQE and CQE 2025-09-09 22:38:38 -04:00
ufs-sysfs.c SCSI misc on 20250806 2025-08-06 15:44:25 +03:00
ufs-sysfs.h
ufs_bsg.c scsi: ufs: core: bsg: Fix crash when arpmb command fails 2025-02-20 22:18:24 -05:00
ufs_bsg.h
ufs_trace.h scsi: ufs: core: Add hba parameter to trace events 2025-02-18 21:34:08 -05:00
ufshcd-crypto.c blk-crypto: add basic hardware-wrapped key support 2025-02-10 09:54:19 -07:00
ufshcd-crypto.h scsi: ufs: core: Add UFSHCD_QUIRK_KEYS_IN_PRDT 2024-07-10 22:32:30 -04:00
ufshcd-priv.h scsi: ufs: core: Add device level exception support 2025-04-03 10:54:31 -04:00
ufshcd.c scsi: ufs: core: Rename ufshcd_wait_for_doorbell_clr() 2025-08-18 22:15:19 -04:00