Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

spi: cadence-quadspi: Add missing check for dma_set_mask

Add check for dma_set_mask() and return the error if it fails.

Fixes: 1a6f854f7daa ("spi: cadence-quadspi: Add Xilinx Versal external DMA support")
Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
Link: https://lore.kernel.org/r/20230606093859.27818-1-jiasheng@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Jiasheng Jiang and committed by
Mark Brown
947c70a2 0c331fd1

+5 -2
+5 -2
drivers/spi/spi-cadence-quadspi.c
··· 1756 1756 cqspi->slow_sram = true; 1757 1757 1758 1758 if (of_device_is_compatible(pdev->dev.of_node, 1759 - "xlnx,versal-ospi-1.0")) 1760 - dma_set_mask(&pdev->dev, DMA_BIT_MASK(64)); 1759 + "xlnx,versal-ospi-1.0")) { 1760 + ret = dma_set_mask(&pdev->dev, DMA_BIT_MASK(64)); 1761 + if (ret) 1762 + goto probe_reset_failed; 1763 + } 1761 1764 } 1762 1765 1763 1766 ret = devm_request_irq(dev, irq, cqspi_irq_handler, 0,