summaryrefslogtreecommitdiff
path: root/drivers/edac
diff options
context:
space:
mode:
authorMenglong Dong <dong.menglong@zte.com.cn>2021-01-12 02:35:40 -0800
committerBorislav Petkov <bp@suse.de>2021-01-19 10:22:23 +0100
commite26124cd5f7099949109608845bba9e9bf96599c (patch)
tree5ee8dcfe8afb4698a7ecb7d9cdc7c73975e3fad9 /drivers/edac
parente0e0427412d0f374461a5294efc161e00df4be53 (diff)
EDAC/xgene: Do not print a failure message to get an IRQ twice
Coccinelle reports a redundant error print in xgene_edac_probe() because platform_get_irq() will already print an error message when it is unable to get an IRQ. Use platform_get_irq_optional() instead which avoids the error message and keep the driver-specific one. [ bp: Sanitize commit message. ] Signed-off-by: Menglong Dong <dong.menglong@zte.com.cn> Signed-off-by: Borislav Petkov <bp@suse.de> Reviewed-by: Robert Richter <rric@kernel.org> Link: https://lkml.kernel.org/r/20210112103540.7818-1-dong.menglong@zte.com.cn
Diffstat (limited to 'drivers/edac')
-rw-r--r--drivers/edac/xgene_edac.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/edac/xgene_edac.c b/drivers/edac/xgene_edac.c
index 1d2c27a00a4a..2ccd1db5e98f 100644
--- a/drivers/edac/xgene_edac.c
+++ b/drivers/edac/xgene_edac.c
@@ -1916,7 +1916,7 @@ static int xgene_edac_probe(struct platform_device *pdev)
int i;
for (i = 0; i < 3; i++) {
- irq = platform_get_irq(pdev, i);
+ irq = platform_get_irq_optional(pdev, i);
if (irq < 0) {
dev_err(&pdev->dev, "No IRQ resource\n");
rc = -EINVAL;