linux-yocto/drivers/ufs
Alok Tiwari ca3e48e968 scsi: ufs: mcq: Fix memory allocation checks for SQE and CQE
[ Upstream commit 5cb782ff3c62c837e4984b6ae9f5d9a423cd5088 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-10-02 13:42:47 +02:00
..
core scsi: ufs: mcq: Fix memory allocation checks for SQE and CQE 2025-10-02 13:42:47 +02:00
host scsi: ufs: exynos: Fix programming of HCI_UTRL_NEXUS_TYPE 2025-08-28 16:28:44 +02:00
Kconfig
Makefile