Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Fabien Dessenne and committed by
Mark Brown
8d1467a6 cc1b69fc

+3 -2
+3 -2
drivers/spi/spi-stm32.c
··· 1839 1839 1840 1840 spi->irq = platform_get_irq(pdev, 0); 1841 1841 if (spi->irq <= 0) { 1842 - dev_err(&pdev->dev, "no irq: %d\n", spi->irq); 1843 - ret = -ENOENT; 1842 + ret = spi->irq; 1843 + if (ret != -EPROBE_DEFER) 1844 + dev_err(&pdev->dev, "failed to get irq: %d\n", ret); 1844 1845 goto err_master_put; 1845 1846 } 1846 1847 ret = devm_request_threaded_irq(&pdev->dev, spi->irq,