diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2023-03-06 21:31:12 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2023-03-07 16:58:32 +0300 |
commit | 208ee586f86237969a91ac60ea10f48db9135143 (patch) | |
tree | 2879990e455a83c6d20a660ac20e80f929b2b13a /drivers/spi/spi-mpc512x-psc.c | |
parent | ee493fa5d91dec02402239a072820b18beb36265 (diff) | |
download | linux-208ee586f86237969a91ac60ea10f48db9135143.tar.xz |
spi: mpc5xxx-psc: Return immediately if IRQ resource is unavailable
Return immediately if IRQ resource is unavailable. This will also
propagate the correct error code in such cases.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20230306183115.87314-3-andriy.shevchenko@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/spi-mpc512x-psc.c')
-rw-r--r-- | drivers/spi/spi-mpc512x-psc.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/spi/spi-mpc512x-psc.c b/drivers/spi/spi-mpc512x-psc.c index a2ea24a63cb4..8a436d1906eb 100644 --- a/drivers/spi/spi-mpc512x-psc.c +++ b/drivers/spi/spi-mpc512x-psc.c @@ -490,6 +490,9 @@ static int mpc512x_psc_spi_of_probe(struct platform_device *pdev) (struct mpc512x_psc_fifo *)(tempp + sizeof(struct mpc52xx_psc)); mps->irq = platform_get_irq(pdev, 0); + if (mps->irq < 0) + return mps->irq; + ret = devm_request_irq(dev, mps->irq, mpc512x_psc_spi_isr, IRQF_SHARED, "mpc512x-psc-spi", mps); if (ret) |