[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220609055533.95866-2-yang.lee@linux.alibaba.com>
Date: Thu, 9 Jun 2022 13:55:33 +0800
From: Yang Li <yang.lee@...ux.alibaba.com>
To: broonie@...nel.org
Cc: conor.dooley@...rochip.com, lewis.hanly@...rochip.com,
linux-riscv@...ts.infradead.org, linux-spi@...r.kernel.org,
linux-kernel@...r.kernel.org, Yang Li <yang.lee@...ux.alibaba.com>,
Abaci Robot <abaci@...ux.alibaba.com>
Subject: [PATCH -next 1/2] spi: Remove unnecessary print function dev_err()
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@...ux.alibaba.com>
Signed-off-by: Yang Li <yang.lee@...ux.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
Powered by blists - more mailing lists