Commit 8d1467a6 authored by Fabien Dessenne's avatar Fabien Dessenne Committed by Mark Brown

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: default avatarFabien Dessenne <fabien.dessenne@st.com>
Acked-by: default avatarAmelie Delaunay <amelie.delaunay@st.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent cc1b69fc
......@@ -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,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment