diff mbox series

[v1,09/28] leds: lgm-sso: Don't spam logs when probe is deferred

Message ID 20210510095045.3299382-10-andy.shevchenko@gmail.com
State Superseded
Headers show
Series leds: cleanups and fwnode refcounting bug fixes | expand

Commit Message

Andy Shevchenko May 10, 2021, 9:50 a.m. UTC
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

When requesting GPIO line the probe can be deferred.
In such case don't spam logs with an error message.
This can be achieved by switching to dev_err_probe().

Fixes: c3987cd2bca3 ("leds: lgm: Add LED controller driver for LGM SoC")
Cc: Amireddy Mallikarjuna reddy <mallikarjunax.reddy@linux.intel.com>
Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
---
 drivers/leds/blink/leds-lgm-sso.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Pavel Machek May 28, 2021, 10:11 a.m. UTC | #1
On Mon 2021-05-10 12:50:26, Andy Shevchenko wrote:
> From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

> 

> When requesting GPIO line the probe can be deferred.

> In such case don't spam logs with an error message.

> This can be achieved by switching to dev_err_probe().

> 

> Fixes: c3987cd2bca3 ("leds: lgm: Add LED controller driver for LGM SoC")

> Cc: Amireddy Mallikarjuna reddy <mallikarjunax.reddy@linux.intel.com>

> Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>


From: does not match signed-off here.

							Pavel
-- 
http://www.livejournal.com/~pavelmachek
Andy Shevchenko May 28, 2021, 10:47 a.m. UTC | #2
On Fri, May 28, 2021 at 12:11:22PM +0200, Pavel Machek wrote:
> On Mon 2021-05-10 12:50:26, Andy Shevchenko wrote:

> > From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

> > 

> > When requesting GPIO line the probe can be deferred.

> > In such case don't spam logs with an error message.

> > This can be achieved by switching to dev_err_probe().

> > 

> > Fixes: c3987cd2bca3 ("leds: lgm: Add LED controller driver for LGM SoC")

> > Cc: Amireddy Mallikarjuna reddy <mallikarjunax.reddy@linux.intel.com>

> > Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>

> 

> From: does not match signed-off here.


True, I have noticed this later, because I have used existing commit as
template. I'll fix all such occurrences.

-- 
With Best Regards,
Andy Shevchenko
Andy Shevchenko May 29, 2021, 9:54 a.m. UTC | #3
On Fri, May 28, 2021 at 1:50 PM Andy Shevchenko
<andy.shevchenko@gmail.com> wrote:
>

> On Fri, May 28, 2021 at 12:11:22PM +0200, Pavel Machek wrote:

> > On Mon 2021-05-10 12:50:26, Andy Shevchenko wrote:

> > > From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

> > >

> > > When requesting GPIO line the probe can be deferred.

> > > In such case don't spam logs with an error message.

> > > This can be achieved by switching to dev_err_probe().

> > >

> > > Fixes: c3987cd2bca3 ("leds: lgm: Add LED controller driver for LGM SoC")

> > > Cc: Amireddy Mallikarjuna reddy <mallikarjunax.reddy@linux.intel.com>

> > > Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>

> >

> > From: does not match signed-off here.

>

> True, I have noticed this later, because I have used existing commit as

> template. I'll fix all such occurrences.


Fixed in v2.

-- 
With Best Regards,
Andy Shevchenko
diff mbox series

Patch

diff --git a/drivers/leds/blink/leds-lgm-sso.c b/drivers/leds/blink/leds-lgm-sso.c
index f6c7a5d0c2f7..91844dcb8bc7 100644
--- a/drivers/leds/blink/leds-lgm-sso.c
+++ b/drivers/leds/blink/leds-lgm-sso.c
@@ -646,7 +646,7 @@  __sso_led_dt_parse(struct sso_led_priv *priv, struct fwnode_handle *fw_ssoled)
 							      fwnode_child,
 							      GPIOD_ASIS, NULL);
 		if (IS_ERR(led->gpiod)) {
-			dev_err(dev, "led: get gpio fail!\n");
+			dev_err_probe(dev, PTR_ERR(led->gpiod), "led: get gpio fail!\n");
 			goto __dt_err;
 		}