From: Emil Renner Berthing <emil.renner.berthing@canonical.com>
To: linux-kernel@vger.kernel.org
Cc: Pavel Machek <pavel@ucw.cz>, Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Paul Walmsley <paul.walmsley@sifive.com>,
Palmer Dabbelt <palmer@dabbelt.com>,
Vincent Pelletier <plr.vincent@gmail.com>,
Bin Meng <bin.meng@windriver.com>,
Aurelien Jarno <aurelien@aurel32.net>,
Ron Economos <w6rz@comcast.net>,
Qiu Wenbo <qiuwenbo@kylinos.com.cn>,
Geert Uytterhoeven <geert@linux-m68k.org>,
Stephen L Arnold <nerdboy@gentoo.org>,
Jianlong Huang <jianlong.huang@starfivetech.com>,
Mark Kettenis <kettenis@openbsd.org>,
Sven Schwermer <sven.schwermer@disruptive-technologies.com>,
Andy Shevchenko <andy.shevchenko@gmail.com>,
David Abdurachmanov <davidlt@rivosinc.com>,
linux-leds@vger.kernel.org, devicetree@vger.kernel.org,
linux-riscv@lists.infradead.org
Subject: [PATCH v1 1/4] leds: pwm-multicolor: Don't show -EPROBE_DEFER as errors
Date: Tue, 5 Jul 2022 23:01:40 +0200 [thread overview]
Message-ID: <20220705210143.315151-2-emil.renner.berthing@canonical.com> (raw)
In-Reply-To: <20220705210143.315151-1-emil.renner.berthing@canonical.com>
When requesting a PWM it might return -EPROBE_DEFER if it hasn't probed
yet. This is not an error, so just propagate the -EPROBE_DEFER without
logging anything. There is already dev_err_probe for exactly this
situation.
Fixes: 9fa2762110dd ("leds: Add PWM multicolor driver")
Signed-off-by: Emil Renner Berthing <emil.renner.berthing@canonical.com>
---
drivers/leds/rgb/leds-pwm-multicolor.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/leds/rgb/leds-pwm-multicolor.c b/drivers/leds/rgb/leds-pwm-multicolor.c
index 45e38708ecb1..eb67b89d28e9 100644
--- a/drivers/leds/rgb/leds-pwm-multicolor.c
+++ b/drivers/leds/rgb/leds-pwm-multicolor.c
@@ -72,8 +72,7 @@ static int iterate_subleds(struct device *dev, struct pwm_mc_led *priv,
pwmled = &priv->leds[priv->mc_cdev.num_colors];
pwmled->pwm = devm_fwnode_pwm_get(dev, fwnode, NULL);
if (IS_ERR(pwmled->pwm)) {
- ret = PTR_ERR(pwmled->pwm);
- dev_err(dev, "unable to request PWM: %d\n", ret);
+ ret = dev_err_probe(dev, PTR_ERR(pwmled->pwm), "unable to request PWM\n");
goto release_fwnode;
}
pwm_init_state(pwmled->pwm, &pwmled->state);
--
2.37.0
next prev parent reply other threads:[~2022-07-05 21:01 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-05 21:01 [PATCH v1 0/4] Add HiFive Unmatched LEDs Emil Renner Berthing
2022-07-05 21:01 ` Emil Renner Berthing [this message]
2022-07-06 7:30 ` [PATCH v1 1/4] leds: pwm-multicolor: Don't show -EPROBE_DEFER as errors Geert Uytterhoeven
2022-07-05 21:01 ` [PATCH v1 2/4] dt-bindings: leds: pwm-multicolor: Add active-low property Emil Renner Berthing
2022-07-06 7:33 ` Geert Uytterhoeven
2022-07-06 16:13 ` Rob Herring
2022-07-05 21:01 ` [PATCH v1 3/4] leds: pwm-multicolor: Support active-low LEDs Emil Renner Berthing
2022-07-06 7:43 ` Geert Uytterhoeven
2022-07-05 21:01 ` [PATCH v1 4/4] riscv: dts: sifive unmatched: Add PWM controlled LEDs Emil Renner Berthing
2022-07-06 7:56 ` Geert Uytterhoeven
2022-07-08 9:21 ` Ron Economos
2022-07-17 10:57 ` Pavel Machek
2022-07-17 14:05 ` Emil Renner Berthing
2022-07-17 11:02 ` [PATCH v1 0/4] Add HiFive Unmatched LEDs Pavel Machek
2022-08-11 21:06 ` Palmer Dabbelt
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=20220705210143.315151-2-emil.renner.berthing@canonical.com \
--to=emil.renner.berthing@canonical.com \
--cc=andy.shevchenko@gmail.com \
--cc=aurelien@aurel32.net \
--cc=bin.meng@windriver.com \
--cc=davidlt@rivosinc.com \
--cc=devicetree@vger.kernel.org \
--cc=geert@linux-m68k.org \
--cc=jianlong.huang@starfivetech.com \
--cc=kettenis@openbsd.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=nerdboy@gentoo.org \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=pavel@ucw.cz \
--cc=plr.vincent@gmail.com \
--cc=qiuwenbo@kylinos.com.cn \
--cc=robh+dt@kernel.org \
--cc=sven.schwermer@disruptive-technologies.com \
--cc=w6rz@comcast.net \
/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
all inboxes | Powered by JetHome®