Skip to contentSkip to conversation

iio: adc: rzg2l_adc: Remove unnecessary print function dev_err()

PATCH Applied Xu Wang 4 participants 4 messages Nov 5, 2021 – Nov 13, 2021

Subsystems (2)
lore
Share & tools
lore

Xu Wang

author
#0 lore raw

PATCH 1/1 iio: adc: rzg2l_adc: Remove unnecessary print function dev_err()

The print function dev_err() is redundant because
platform_get_irq() already prints an error.

---
 drivers/iio/adc/rzg2l_adc.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/iio/adc/rzg2l_adc.c +1 -3
index 32fbf57c362f..9d5be52bd948 100644
@@ -506,10 +506,8 @@ static int rzg2l_adc_probe(struct platform_device *pdev)
 	}
 
 	irq = platform_get_irq(pdev, 0);
-	if (irq < 0) {
-		dev_err(dev, "no irq resource\n");
+	if (irq < 0)
 		return irq;
-	}
 
 	ret = devm_request_irq(dev, irq, rzg2l_adc_isr,
 			       0, dev_name(dev), adc);
Signature · 1 line
2.25.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 4 lines · Xu Wang

The print function dev_err() is redundant because
platform_get_irq() already prints an error.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

maintainer Reviewed-by on v1 1/1
#2 lore raw
In reply to Xu Wang

Hi Xu,

Thank you for the patch.

Quoted 7 lines

-----Original Message-----
From: Xu Wang <[email protected]>
Sent: 05 November 2021 01:55
To: Prabhakar Mahadev Lad <[email protected]>; [email protected]; [email protected]
Cc: [email protected]; [email protected]; [email protected]
Subject: [PATCH] iio: adc: rzg2l_adc: Remove unnecessary print function dev_err()

Quoted 8 lines

The print function dev_err() is redundant because
platform_get_irq() already prints an error.

---
 drivers/iio/adc/rzg2l_adc.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Cheers,
Prabhakar

Quoted 18 lines
drivers/iio/adc/rzg2l_adc.c index renamed from drivers/iio/adc/rzg2l_adc.c +0 -0

32fbf57c362f..9d5be52bd948 100644

drivers/iio/adc/rzg2l_adc.c +1 -4
@@ -506,10 +506,8 @@ static int rzg2l_adc_probe(struct platform_device *pdev)
 	}
 
 	irq = platform_get_irq(pdev, 0);
-	if (irq < 0) {
-		dev_err(dev, "no irq resource\n");
+	if (irq < 0)
 		return irq;
-	}
 
 	ret = devm_request_irq(dev, irq, rzg2l_adc_isr,
 			       0, dev_name(dev), adc);
--

2.25.1

maintainer Applied
#3 lore raw
In reply to Xu Wang
Quoted 4 lines · On Fri, 5 Nov 2021 01:55:04 +0000 Xu Wang <[email protected]> wrote:

The print function dev_err() is redundant because
platform_get_irq() already prints an error.

Applied, thanks

Jonathan

Quoted 20 lines
---
 drivers/iio/adc/rzg2l_adc.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/iio/adc/rzg2l_adc.c +1 -3
index 32fbf57c362f..9d5be52bd948 100644
@@ -506,10 +506,8 @@ static int rzg2l_adc_probe(struct platform_device *pdev)
 	}
 
 	irq = platform_get_irq(pdev, 0);
-	if (irq < 0) {
-		dev_err(dev, "no irq resource\n");
+	if (irq < 0)
 		return irq;
-	}
 
 	ret = devm_request_irq(dev, irq, rzg2l_adc_isr,
 			       0, dev_name(dev), adc);