[PATCH -next 1/2] spi: Remove unnecessary print function dev_err()
Yang Li
yang.lee at linux.alibaba.com
Wed Jun 8 22:55:33 PDT 2022
The function platform_get_irq() never returns 0, and the print function
dev_err() is redundant because platform_get_irq() already prints an error.
Eliminate the follow coccicheck warning:
./drivers/spi/spi-microchip-core.c:543:2-9: line 543 is redundant
because platform_get_irq() already prints an error
Reported-by: Abaci Robot <abaci at linux.alibaba.com>
Signed-off-by: Yang Li <yang.lee at linux.alibaba.com>
---
drivers/spi/spi-microchip-core.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/spi/spi-microchip-core.c b/drivers/spi/spi-microchip-core.c
index 3bd285dd4964..d8ae25ccffa8 100644
--- a/drivers/spi/spi-microchip-core.c
+++ b/drivers/spi/spi-microchip-core.c
@@ -539,8 +539,7 @@ static int mchp_corespi_probe(struct platform_device *pdev)
}
spi->irq = platform_get_irq(pdev, 0);
- if (spi->irq <= 0) {
- dev_err(&pdev->dev, "invalid IRQ %d for SPI controller\n", spi->irq);
+ if (spi->irq < 0) {
ret = spi->irq;
goto error_release_master;
}
--
2.20.1.7.g153144c
More information about the linux-riscv
mailing list