lkml.org 
[lkml]   [2021]   [Jan]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v2] edac: remove redundant error print in xgene_edac_probe
Date
From: Menglong Dong <dong.menglong@zte.com.cn>

Coccinelle reports a redundant error print in xgene_edac_probe.
As 'platform_get_irq' already prints the error message, error
print here is redundant.

Fix it by using 'platform_get_irq_optional' in place of
'platform_get_irq', as Robert suggested.

Signed-off-by: Menglong Dong <dong.menglong@zte.com.cn>
---
v2:
- use 'platform_get_irq_optional' instead of 'platform_get_irq'
---
drivers/edac/xgene_edac.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

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;
--
2.17.1
\
 
 \ /
  Last update: 2021-01-12 11:38    [W:0.032 / U:0.420 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site