spi: stm32: return the get_irq error
During probe, return the "get_irq" error value instead of -ENOENT. This allows the driver to be defer probed if needed. Signed-off-by: Fabien Dessenne <fabien.dessenne@st.com> Acked-by: Amelie Delaunay <amelie.delaunay@st.com> Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
cc1b69fc5f
commit
8d1467a684
|
@ -1839,8 +1839,9 @@ static int stm32_spi_probe(struct platform_device *pdev)
|
|||
|
||||
spi->irq = platform_get_irq(pdev, 0);
|
||||
if (spi->irq <= 0) {
|
||||
dev_err(&pdev->dev, "no irq: %d\n", spi->irq);
|
||||
ret = -ENOENT;
|
||||
ret = spi->irq;
|
||||
if (ret != -EPROBE_DEFER)
|
||||
dev_err(&pdev->dev, "failed to get irq: %d\n", ret);
|
||||
goto err_master_put;
|
||||
}
|
||||
ret = devm_request_threaded_irq(&pdev->dev, spi->irq,
|
||||
|
|
Loading…
Reference in a new issue