linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] i2c: remove redundant error print in stm32f7_i2c_probe
@ 2021-01-12  8:53 menglong8.dong
  2021-02-12 10:15 ` Wolfram Sang
  0 siblings, 1 reply; 2+ messages in thread
From: menglong8.dong @ 2021-01-12  8:53 UTC (permalink / raw)
  To: pierre-yves.mordret
  Cc: mcoquelin.stm32, alexandre.torgue, linux-i2c, linux-stm32,
	linux-arm-kernel, linux-kernel, Menglong Dong

From: Menglong Dong <dong.menglong@zte.com.cn>

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 <dong.menglong@zte.com.cn>
---
 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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] i2c: remove redundant error print in stm32f7_i2c_probe
  2021-01-12  8:53 [PATCH] i2c: remove redundant error print in stm32f7_i2c_probe menglong8.dong
@ 2021-02-12 10:15 ` Wolfram Sang
  0 siblings, 0 replies; 2+ messages in thread
From: Wolfram Sang @ 2021-02-12 10:15 UTC (permalink / raw)
  To: menglong8.dong
  Cc: pierre-yves.mordret, mcoquelin.stm32, alexandre.torgue,
	linux-i2c, linux-stm32, linux-arm-kernel, linux-kernel,
	Menglong Dong

[-- Attachment #1: Type: text/plain, Size: 494 bytes --]

On Tue, Jan 12, 2021 at 12:53:11AM -0800, menglong8.dong@gmail.com wrote:
> From: Menglong Dong <dong.menglong@zte.com.cn>
> 
> 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 <dong.menglong@zte.com.cn>

Applied to for-next, thanks!

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


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-02-12 10:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-12  8:53 [PATCH] i2c: remove redundant error print in stm32f7_i2c_probe menglong8.dong
2021-02-12 10:15 ` Wolfram Sang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).