Skip to content

Commit 8640113

Browse files
DhruvaG2000broonie
authored andcommitted
spi: spi-cadence-quadspi: Fix missing unwind goto warnings
The following smatch warnings [0] were recently introduced: drivers/spi/spi-cadence-quadspi.c:1882 cqspi_probe() warn: missing unwind goto? Fix these warnings by releasing dma channel and adding a goto fail probe. [0] https://lore.kernel.org/all/[email protected]/ Fixes: 0578a6d ("spi: spi-cadence-quadspi: add runtime pm support") Reported-by: kernel test robot <[email protected]> Reported-by: Dan Carpenter <[email protected]> Closes: https://lore.kernel.org/r/[email protected]/ Signed-off-by: Dhruva Gole <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 2d9f487 commit 8640113

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
@@ -1878,8 +1878,11 @@ static int cqspi_probe(struct platform_device *pdev)
18781878
}
18791879

18801880
ret = devm_pm_runtime_enable(dev);
1881-
if (ret)
1882-
return ret;
1881+
if (ret) {
1882+
if (cqspi->rx_chan)
1883+
dma_release_channel(cqspi->rx_chan);
1884+
goto probe_setup_failed;
1885+
}
18831886

18841887
pm_runtime_set_autosuspend_delay(dev, CQSPI_AUTOSUSPEND_TIMEOUT);
18851888
pm_runtime_use_autosuspend(dev);

0 commit comments

Comments
 (0)