Smatch complains that drivers/spi/spi-davinci.c:915 davinci_spi_probe() warn: platform_get_irq() does not return zero There is no need to check whether the return value is zero as `platform_get_irq()` only returns non-zero IRQ number on success or negative error number on failure, removing them to solve this problem. Signed-off-by: Li Ningke <lnk_01@xxxxxxxxxxx> Reviewed-by: Dongliang Mu <dzm91@xxxxxxxxxxx> --- The issue is found by static analysis and the patch remains untested. --- drivers/spi/spi-davinci.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/spi/spi-davinci.c b/drivers/spi/spi-davinci.c index d112c2cac042..fdb241e3a7bf 100644 --- a/drivers/spi/spi-davinci.c +++ b/drivers/spi/spi-davinci.c @@ -912,8 +912,6 @@ static int davinci_spi_probe(struct platform_device *pdev) init_completion(&dspi->done); ret = platform_get_irq(pdev, 0); - if (ret == 0) - ret = -EINVAL; if (ret < 0) goto free_master; dspi->irq = ret; -- 2.34.1