diff options
author | Ruan Jinjie <ruanjinjie@huawei.com> | 2023-08-02 12:43:57 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2023-08-07 16:38:39 +0300 |
commit | 3182d49aad5f1cd8acdcf7de0c5b651772edd32e (patch) | |
tree | 22907b3bf6367e8d8b7d936edcf39527a17ff28c /drivers/spi/spi-zynq-qspi.c | |
parent | 33f1ef6d4eb6bca726608ed939c9fd94d96ceefd (diff) | |
download | linux-3182d49aad5f1cd8acdcf7de0c5b651772edd32e.tar.xz |
spi: spi-zynq: Do not check for 0 return after calling platform_get_irq()
It is not possible for platform_get_irq() to return 0. Use the
return value from platform_get_irq().
Signed-off-by: Ruan Jinjie <ruanjinjie@huawei.com>
Link: https://lore.kernel.org/r/20230802094357.981100-1-ruanjinjie@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/spi-zynq-qspi.c')
-rw-r--r-- | drivers/spi/spi-zynq-qspi.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/spi/spi-zynq-qspi.c b/drivers/spi/spi-zynq-qspi.c index ee1995b91287..0db69a2a72ff 100644 --- a/drivers/spi/spi-zynq-qspi.c +++ b/drivers/spi/spi-zynq-qspi.c @@ -679,8 +679,8 @@ static int zynq_qspi_probe(struct platform_device *pdev) } xqspi->irq = platform_get_irq(pdev, 0); - if (xqspi->irq <= 0) { - ret = -ENXIO; + if (xqspi->irq < 0) { + ret = xqspi->irq; goto clk_dis_all; } ret = devm_request_irq(&pdev->dev, xqspi->irq, zynq_qspi_irq, |