diff options
author | Fabien Dessenne <fabien.dessenne@st.com> | 2019-04-24 14:38:44 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2019-05-02 10:38:41 +0900 |
commit | 8d1467a68426c61807c97163459b481ecb714523 (patch) | |
tree | 146e7d6fc06a656de6fc2634aa140370348a4a02 /drivers | |
parent | cc1b69fc5f9f52cf18295db05cad57187cee1c1d (diff) |
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/spi/spi-stm32.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/spi/spi-stm32.c b/drivers/spi/spi-stm32.c index 4186ed20d796..b222ce8d083e 100644 --- a/drivers/spi/spi-stm32.c +++ b/drivers/spi/spi-stm32.c @@ -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, |