diff options
| author | Krzysztof Kozlowski <[email protected]> | 2020-09-01 15:27:10 +0000 |
|---|---|---|
| committer | Mark Brown <[email protected]> | 2020-09-08 17:19:29 +0000 |
| commit | a05cec2dc2df1e5d25addb7aba398f3eb451e163 (patch) | |
| tree | a81076c476f50270721372669b117f702862c055 /drivers/spi/spi-stm32.c | |
| parent | spi: qcom-qspi: Simplify with dev_err_probe() (diff) | |
| download | kernel-a05cec2dc2df1e5d25addb7aba398f3eb451e163.tar.gz kernel-a05cec2dc2df1e5d25addb7aba398f3eb451e163.zip | |
spi: stm32: Simplify with dev_err_probe()
Common pattern of handling deferred probe can be simplified with
dev_err_probe(). Less code and the error value gets printed.
Signed-off-by: Krzysztof Kozlowski <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Mark Brown <[email protected]>
Diffstat (limited to 'drivers/spi/spi-stm32.c')
| -rw-r--r-- | drivers/spi/spi-stm32.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/spi/spi-stm32.c b/drivers/spi/spi-stm32.c index d4b33b358a31..f0e594b2fee4 100644 --- a/drivers/spi/spi-stm32.c +++ b/drivers/spi/spi-stm32.c @@ -1857,9 +1857,7 @@ static int stm32_spi_probe(struct platform_device *pdev) spi->irq = platform_get_irq(pdev, 0); if (spi->irq <= 0) { - ret = spi->irq; - if (ret != -EPROBE_DEFER) - dev_err(&pdev->dev, "failed to get irq: %d\n", ret); + ret = dev_err_probe(&pdev->dev, spi->irq, "failed to get irq\n"); goto err_master_put; } ret = devm_request_threaded_irq(&pdev->dev, spi->irq, |
