linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: menglong8.dong@gmail.com
To: rric@kernel.org
Cc: khuong@os.amperecomputing.com, bp@alien8.de, mchehab@kernel.org,
	tony.luck@intel.com, james.morse@arm.com,
	linux-edac@vger.kernel.org, linux-kernel@vger.kernel.org,
	Menglong Dong <dong.menglong@zte.com.cn>
Subject: [PATCH v2] edac: remove redundant error print in xgene_edac_probe
Date: Tue, 12 Jan 2021 02:35:40 -0800	[thread overview]
Message-ID: <20210112103540.7818-1-dong.menglong@zte.com.cn> (raw)

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


             reply	other threads:[~2021-01-12 10:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-12 10:35 menglong8.dong [this message]
2021-01-12 11:40 ` [PATCH v2] edac: remove redundant error print in xgene_edac_probe Robert Richter
2021-01-19  9:32 ` Borislav Petkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210112103540.7818-1-dong.menglong@zte.com.cn \
    --to=menglong8.dong@gmail.com \
    --cc=bp@alien8.de \
    --cc=dong.menglong@zte.com.cn \
    --cc=james.morse@arm.com \
    --cc=khuong@os.amperecomputing.com \
    --cc=linux-edac@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=rric@kernel.org \
    --cc=tony.luck@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).