Linux LED subsystem development
 help / color / mirror / Atom feed
From: Dan Murphy <dmurphy@ti.com>
To: Tomi Valkeinen <tomi.valkeinen@ti.com>,
	Jacek Anaszewski <jacek.anaszewski@gmail.com>,
	Pavel Machek <pavel@ucw.cz>, <linux-leds@vger.kernel.org>
Subject: Re: [PATCH] leds: tlc591xxt: hide error on EPROBE_DEFER
Date: Fri, 17 Apr 2020 07:55:25 -0500	[thread overview]
Message-ID: <4deb542b-211e-edb3-637b-c3939fb26fa3@ti.com> (raw)
In-Reply-To: <20200417113758.24924-1-tomi.valkeinen@ti.com>

Tomi

On 4/17/20 6:37 AM, Tomi Valkeinen wrote:
> If devm_led_classdev_register_ext() fails with EPROBE_DEFER, we get:
>
> tlc591xx 0-0040: couldn't register LED (null)
>
> Only print the error if the error is something else than EPROBE_DEFER.
>
> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
> ---
>   drivers/leds/leds-tlc591xx.c | 5 +++--
>   1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/leds/leds-tlc591xx.c b/drivers/leds/leds-tlc591xx.c
> index a8911ebd30e5..0929f1275814 100644
> --- a/drivers/leds/leds-tlc591xx.c
> +++ b/drivers/leds/leds-tlc591xx.c
> @@ -214,8 +214,9 @@ tlc591xx_probe(struct i2c_client *client,
>   		err = devm_led_classdev_register_ext(dev, &led->ldev,
>   						     &init_data);
>   		if (err < 0) {
> -			dev_err(dev, "couldn't register LED %s\n",
> -				led->ldev.name);
> +			if (err != -EPROBE_DEFER)
> +				dev_err(dev, "couldn't register LED %s\n",
> +					led->ldev.name);
>   			return err;
>   		}
>   	}
Reviewed-by: Dan Murphy <dmurphy@ti.com>

  reply	other threads:[~2020-04-17 13:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-17 11:37 [PATCH] leds: tlc591xxt: hide error on EPROBE_DEFER Tomi Valkeinen
2020-04-17 12:55 ` Dan Murphy [this message]
2020-04-17 13:39   ` Pavel Machek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4deb542b-211e-edb3-637b-c3939fb26fa3@ti.com \
    --to=dmurphy@ti.com \
    --cc=jacek.anaszewski@gmail.com \
    --cc=linux-leds@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=tomi.valkeinen@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox