diff options
author | Ruan Jinjie <ruanjinjie@huawei.com> | 2023-08-02 17:32:38 +0800 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2023-08-07 14:38:40 +0100 |
commit | 8102d64c04e8ead02c30bb07ff7dd5c41ed61bce (patch) | |
tree | 3f97509d99b9683e53036d4db12b7bc7c1fe356e /drivers/spi/spi-bcm2835aux.c | |
parent | 3182d49aad5f1cd8acdcf7de0c5b651772edd32e (diff) | |
download | linux-stable-8102d64c04e8ead02c30bb07ff7dd5c41ed61bce.tar.gz linux-stable-8102d64c04e8ead02c30bb07ff7dd5c41ed61bce.tar.bz2 linux-stable-8102d64c04e8ead02c30bb07ff7dd5c41ed61bce.zip |
spi: 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>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com> #
Link: https://lore.kernel.org/r/20230802093238.975906-1-ruanjinjie@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/spi-bcm2835aux.c')
-rw-r--r-- | drivers/spi/spi-bcm2835aux.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/spi/spi-bcm2835aux.c b/drivers/spi/spi-bcm2835aux.c index 8ace417c0a29..843dac847584 100644 --- a/drivers/spi/spi-bcm2835aux.c +++ b/drivers/spi/spi-bcm2835aux.c @@ -520,8 +520,8 @@ static int bcm2835aux_spi_probe(struct platform_device *pdev) } bs->irq = platform_get_irq(pdev, 0); - if (bs->irq <= 0) - return bs->irq ? bs->irq : -ENODEV; + if (bs->irq < 0) + return bs->irq; /* this also enables the HW block */ err = clk_prepare_enable(bs->clk); |