[PATCH -next 1/2] spi: Remove unnecessary print function dev_err()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxx>
Signed-off-by: Yang Li <yang.lee@xxxxxxxxxxxxxxxxx>
---
 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




[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux