Skip to contentSkip to conversation

memory: tegra: Avoid double error messaging when IRQ absent

PATCH In review Keyur Patel 2 participants 2 messages Jun 11, 2020 – Jun 12, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 memory: tegra: Avoid double error messaging when IRQ absent

Since the commit 7723f4c ("driver core: platform: Add an error message to platform_get_irq*()") platform_get_irq() started issuing an error message. Thus, there is no need to have the same in the driver.

---
 drivers/memory/tegra/mc.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/memory/tegra/mc.c +1 -3
index ec8403557ed4..f519c0987485 100644
@@ -659,10 +659,8 @@ static int tegra_mc_probe(struct platform_device *pdev)
 	}
 
 	mc->irq = platform_get_irq(pdev, 0);
-	if (mc->irq < 0) {
-		dev_err(&pdev->dev, "interrupt not specified\n");
+	if (mc->irq < 0)
 		return mc->irq;
-	}
 
 	WARN(!mc->soc->client_id_mask, "missing client ID mask for this SoC\n");
 
Signature · 1 line
2.26.2
Reviewed-by on v1 1/1
#1 lore raw

11.06.2020 22:07, Keyur Patel пишет:

Quoted 16 lines

Since the commit 7723f4c ("driver core: platform: Add an error message to platform_get_irq*()") platform_get_irq() started issuing an error message. Thus, there is no need to have the same in the driver.

---
 drivers/memory/tegra/mc.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/memory/tegra/mc.c +0 -0
index ec8403557ed4..f519c0987485 100644
@@ -659,10 +659,8 @@ static int tegra_mc_probe(struct platform_device *pdev)
 	}

drivers/memory/tegra/mc.c static int tegra_mc_probe(struct platform_device *pdev) · line 666

Quoted 10 lines
drivers/memory/tegra/mc.c +1 -3
 
 	mc->irq = platform_get_irq(pdev, 0);
-	if (mc->irq < 0) {
-		dev_err(&pdev->dev, "interrupt not specified\n");
+	if (mc->irq < 0)
 		return mc->irq;
-	}
 
 	WARN(!mc->soc->client_id_mask, "missing client ID mask for this SoC\n");