linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] gpio: msic: Delete an error message in platform_msic_gpio_probe()
@ 2020-04-04 19:35 Markus Elfring
  2020-04-05 10:43 ` Andy Shevchenko
  0 siblings, 1 reply; 2+ messages in thread
From: Markus Elfring @ 2020-04-04 19:35 UTC (permalink / raw)
  To: linux-gpio, Andy Shevchenko, Bartosz Golaszewski, Linus Walleij
  Cc: LKML, kernel-janitors, Tang Bin

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sat, 4 Apr 2020 21:30:12 +0200

The function “platform_get_irq” can log an error already.
Thus omit a redundant message for the exception handling in the
calling function.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 drivers/gpio/gpio-msic.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/gpio/gpio-msic.c b/drivers/gpio/gpio-msic.c
index 7e3c96e4ab2c..5548b7be36b3 100644
--- a/drivers/gpio/gpio-msic.c
+++ b/drivers/gpio/gpio-msic.c
@@ -248,10 +248,8 @@ static int platform_msic_gpio_probe(struct platform_device *pdev)
 	int retval;
 	int i;

-	if (irq < 0) {
-		dev_err(dev, "no IRQ line: %d\n", irq);
+	if (irq < 0)
 		return irq;
-	}

 	if (!pdata || !pdata->gpio_base) {
 		dev_err(dev, "incorrect or missing platform data\n");
--
2.26.0


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

* Re: [PATCH] gpio: msic: Delete an error message in platform_msic_gpio_probe()
  2020-04-04 19:35 [PATCH] gpio: msic: Delete an error message in platform_msic_gpio_probe() Markus Elfring
@ 2020-04-05 10:43 ` Andy Shevchenko
  0 siblings, 0 replies; 2+ messages in thread
From: Andy Shevchenko @ 2020-04-05 10:43 UTC (permalink / raw)
  To: Markus Elfring
  Cc: open list:GPIO SUBSYSTEM, Andy Shevchenko, Bartosz Golaszewski,
	Linus Walleij, LKML, kernel-janitors, Tang Bin

On Sat, Apr 4, 2020 at 10:35 PM Markus Elfring <Markus.Elfring@web.de> wrote:
>
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Sat, 4 Apr 2020 21:30:12 +0200
>
> The function “platform_get_irq” can log an error already.
> Thus omit a redundant message for the exception handling in the
> calling function.
>
> This issue was detected by using the Coccinelle software.

No need to touch this ancient driver, since it's subject to remove in
one of the (nearest) future releases.

-- 
With Best Regards,
Andy Shevchenko

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

end of thread, other threads:[~2020-04-05 10:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-04 19:35 [PATCH] gpio: msic: Delete an error message in platform_msic_gpio_probe() Markus Elfring
2020-04-05 10:43 ` Andy Shevchenko

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