Skip to content

Commit 947c70a

Browse files
JiangJiasbroonie
authored andcommitted
spi: cadence-quadspi: Add missing check for dma_set_mask
Add check for dma_set_mask() and return the error if it fails. Fixes: 1a6f854 ("spi: cadence-quadspi: Add Xilinx Versal external DMA support") Signed-off-by: Jiasheng Jiang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 0c331fd commit 947c70a

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

drivers/spi/spi-cadence-quadspi.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1756,8 +1756,11 @@ static int cqspi_probe(struct platform_device *pdev)
17561756
cqspi->slow_sram = true;
17571757

17581758
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+
}
17611764
}
17621765

17631766
ret = devm_request_irq(dev, irq, cqspi_irq_handler, 0,

0 commit comments

Comments
 (0)