mirror of https://gitee.com/openkylin/linux.git
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
This commit is contained in:
parent
e0e0427412
commit
e26124cd5f
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue