Skip to contentSkip to conversation

i2c: lpc2k: Remove superfluous error message in i2c_lpc2k_probe()

PATCH New Aishwarya Ramakrishnan 1 participant 1 message May 3, 2020

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

PATCH 1/1 i2c: lpc2k: Remove superfluous error message in i2c_lpc2k_probe()

The function platform_get_irq can log an error by itself. This omit a redundant message for exception handling in the calling function.

Suggested by Coccinelle.

---
 drivers/i2c/busses/i2c-lpc2k.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/i2c/busses/i2c-lpc2k.c +1 -3
index 13b0c12e2dba..43dc9b7043e4 100644
@@ -362,10 +362,8 @@ static int i2c_lpc2k_probe(struct platform_device *pdev)
 		return PTR_ERR(i2c->base);
 
 	i2c->irq = platform_get_irq(pdev, 0);
-	if (i2c->irq < 0) {
-		dev_err(&pdev->dev, "can't get interrupt resource\n");
+	if (i2c->irq < 0)
 		return i2c->irq;
-	}
 
 	init_waitqueue_head(&i2c->wait);
 
Signature · 1 line
2.17.1