# \[PATCH\] i2c: remove redundant error print in stm32f7\_i2c\_probe

- Subsystems: I2C SUBSYSTEM, I2C SUBSYSTEM HOST DRIVERS, ST STM32 I2C/SMBUS DRIVER, THE REST
- Maintainers: Andi Shyti, Pierre-Yves MORDRET, Alain Volmat, Linus Torvalds
- List: linux-arm-kernel
- 2 messages, 2 authors
- Page: https://ratatoskr.run/linux-arm-kernel/2021/01/6231248/t

## \[PATCH\] i2c: remove redundant error print in stm32f7\_i2c\_probe

- From: \<hidden\>
- Date: 2021-01-12 08:54:14 
- Message: https://ratatoskr.run/linux-arm-kernel/2021/01/6231248.md

```text
From: Menglong Dong <redacted>

Coccinelle reports a redundant error print in stm32f7_i2c_probe.
As 'platform_get_irq' already prints the error message, error
print here is redundant and can be removed.

Signed-off-by: Menglong Dong <redacted>
---
 drivers/i2c/busses/i2c-stm32f7.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/i2c/busses/i2c-stm32f7.c b/drivers/i2c/busses/i2c-stm32f7.c
index 9aa8e65b511e..adba496e1e31 100644
--- a/drivers/i2c/busses/i2c-stm32f7.c
+++ b/drivers/i2c/busses/i2c-stm32f7.c
@@ -2026,12 +2026,8 @@ static int stm32f7_i2c_probe(struct platform_device *pdev)
 	}
 
 	irq_error = platform_get_irq(pdev, 1);
-	if (irq_error <= 0) {
-		if (irq_error != -EPROBE_DEFER)
-			dev_err(&pdev->dev, "Failed to get IRQ error: %d\n",
-				irq_error);
+	if (irq_error <= 0)
 		return irq_error ? : -ENOENT;
-	}
 
 	i2c_dev->wakeup_src = of_property_read_bool(pdev->dev.of_node,
 						    "wakeup-source");
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
```

## Re: \[PATCH\] i2c: remove redundant error print in stm32f7\_i2c\_probe

- From: Wolfram Sang \<wsa@kernel.org\>
- Date: 2021-02-12 10:17:05 
- Message: https://ratatoskr.run/linux-arm-kernel/2021/02/6268351.md

```text
On Tue, Jan 12, 2021 at 12:53:11AM -0800, menglong8.dong@gmail.com wrote:
> From: Menglong Dong <redacted>
> 
> Coccinelle reports a redundant error print in stm32f7_i2c_probe.
> As 'platform_get_irq' already prints the error message, error
> print here is redundant and can be removed.
> 
> Signed-off-by: Menglong Dong <redacted>

Applied to for-next, thanks!

@maintainers: it would be helpful/faster if I could get an ack from you
beforehand.

```
