linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1] i2c: img-scb: remove duplicate dev_err()
@ 2020-04-14 14:26 Dejin Zheng
  2020-04-14 14:38 ` Andy Shevchenko
  0 siblings, 1 reply; 9+ messages in thread
From: Dejin Zheng @ 2020-04-14 14:26 UTC (permalink / raw)
  To: linus.walleij, patrice.chotard, info, allison,
	nehal-bakulchandra.shah, andriy.shevchenko, tglx, linux-i2c
  Cc: linux-kernel, Dejin Zheng

it will print an error message by itself when platform_get_irq()
goes wrong. so don't need dev_err() in here again.

Signed-off-by: Dejin Zheng <zhengdejin5@gmail.com>
---
 drivers/i2c/busses/i2c-img-scb.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/i2c/busses/i2c-img-scb.c b/drivers/i2c/busses/i2c-img-scb.c
index 422097a31c95..2f6de763816a 100644
--- a/drivers/i2c/busses/i2c-img-scb.c
+++ b/drivers/i2c/busses/i2c-img-scb.c
@@ -1344,10 +1344,8 @@ static int img_i2c_probe(struct platform_device *pdev)
 		return PTR_ERR(i2c->base);
 
 	irq = platform_get_irq(pdev, 0);
-	if (irq < 0) {
-		dev_err(&pdev->dev, "can't get irq number\n");
+	if (irq < 0)
 		return irq;
-	}
 
 	i2c->sys_clk = devm_clk_get(&pdev->dev, "sys");
 	if (IS_ERR(i2c->sys_clk)) {
-- 
2.25.0


^ permalink raw reply related	[flat|nested] 9+ messages in thread
* Re: [PATCH v1] i2c: img-scb: remove duplicate dev_err()
@ 2020-04-14 15:48 Markus Elfring
  2020-04-15  2:54 ` Dejin Zheng
  0 siblings, 1 reply; 9+ messages in thread
From: Markus Elfring @ 2020-04-14 15:48 UTC (permalink / raw)
  To: Dejin Zheng, linux-i2c
  Cc: linux-kernel, Allison Randal, Andy Shevchenko, Linus Walleij,
	Patrice Chotard, Shah Nehal-Bakulchandra, Tang Bin,
	Thomas Gleixner

> it will print an error message by itself when platform_get_irq()
> goes wrong. so don't need dev_err() in here again.

I suggest to improve the change description.
Can you get any further inspiration by previous patches from
other contributors according to the presented transformation pattern?

Would you like to adjust any more source files in the mentioned
software area?

Regards,
Markus

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

end of thread, other threads:[~2020-04-15  2:54 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-14 14:26 [PATCH v1] i2c: img-scb: remove duplicate dev_err() Dejin Zheng
2020-04-14 14:38 ` Andy Shevchenko
2020-04-14 15:50   ` Dejin Zheng
2020-04-14 16:20     ` Andy Shevchenko
2020-04-14 16:42       ` Wolfram Sang
2020-04-14 16:46         ` Andy Shevchenko
2020-04-14 16:56           ` Wolfram Sang
2020-04-14 15:48 Markus Elfring
2020-04-15  2:54 ` Dejin Zheng

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).