Skip to content

Commit

Permalink
spi: cadence-quadspi: Add missing check for dma_set_mask
Browse files Browse the repository at this point in the history
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 <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>
  • Loading branch information
JiangJias authored and broonie committed Jun 6, 2023
1 parent 0c331fd commit 947c70a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions drivers/spi/spi-cadence-quadspi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1756,8 +1756,11 @@ static int cqspi_probe(struct platform_device *pdev)
cqspi->slow_sram = true;

if (of_device_is_compatible(pdev->dev.of_node,
"xlnx,versal-ospi-1.0"))
dma_set_mask(&pdev->dev, DMA_BIT_MASK(64));
"xlnx,versal-ospi-1.0")) {
ret = dma_set_mask(&pdev->dev, DMA_BIT_MASK(64));
if (ret)
goto probe_reset_failed;
}
}

ret = devm_request_irq(dev, irq, cqspi_irq_handler, 0,
Expand Down

0 comments on commit 947c70a

Please sign in to comment.