Skip to contentSkip to conversation

mfd: hi6421-spmi-pmic: fix platform_get_irq.cocci warning

PATCH In review Yihao Han 2 participants 2 messages Mar 2, 2022 – Mar 18, 2022 Char and misc drivers

lore
Share & tools
lore

Yihao Han

author
#0 lore raw

PATCH 1/1 mfd: hi6421-spmi-pmic: fix platform_get_irq.cocci warning

Remove dev_err() messages after platform_get_irq*() failures. platform_get_irq() already prints an error.

Generated by: scripts/coccinelle/api/platform_get_irq.cocci

---
 drivers/misc/hi6421v600-irq.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/misc/hi6421v600-irq.c +1 -3
index 1c763796cf1f..babb85364aa9 100644
@@ -244,10 +244,8 @@ static int hi6421v600_irq_probe(struct platform_device *pdev)
 	pmic_pdev = container_of(pmic_dev, struct platform_device, dev);
 
 	priv->irq = platform_get_irq(pmic_pdev, 0);
-	if (priv->irq < 0) {
-		dev_err(dev, "Error %d when getting IRQs\n", priv->irq);
+	if (priv->irq < 0)
 		return priv->irq;
-	}
 
 	platform_set_drvdata(pdev, priv);
 
Signature · 1 line
2.17.1
#1 lore raw
Quoted 9 lines · Yihao Han

Remove dev_err() messages after platform_get_irq*() failures. platform_get_irq() already prints an error.

Generated by: scripts/coccinelle/api/platform_get_irq.cocci

---
 drivers/misc/hi6421v600-irq.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Subject line is wrong :(