Commit e26124cd authored by Menglong Dong's avatar Menglong Dong Committed by Borislav Petkov

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: default avatarMenglong Dong <dong.menglong@zte.com.cn>
Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
Reviewed-by: default avatarRobert Richter <rric@kernel.org>
Link: https://lkml.kernel.org/r/20210112103540.7818-1-dong.menglong@zte.com.cn
parent e0e04274
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment