linux-leds.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] leds: pwm-multicolor: Simplify an error message
@ 2023-04-15 16:27 Christophe JAILLET
  2023-04-20 11:32 ` Lee Jones
  0 siblings, 1 reply; 2+ messages in thread
From: Christophe JAILLET @ 2023-04-15 16:27 UTC (permalink / raw)
  To: Pavel Machek, Lee Jones
  Cc: linux-kernel, kernel-janitors, Christophe JAILLET, linux-leds

dev_err_probe() already display the error code. There is no need to
duplicate it explicitly in the error message.

While at it, add a missing \n at the end of the message.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
 drivers/leds/rgb/leds-pwm-multicolor.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/leds/rgb/leds-pwm-multicolor.c b/drivers/leds/rgb/leds-pwm-multicolor.c
index da9d2218ae18..46cd062b8b24 100644
--- a/drivers/leds/rgb/leds-pwm-multicolor.c
+++ b/drivers/leds/rgb/leds-pwm-multicolor.c
@@ -158,8 +158,8 @@ static int led_pwm_mc_probe(struct platform_device *pdev)
 	ret = led_pwm_mc_set(cdev, cdev->brightness);
 	if (ret)
 		return dev_err_probe(&pdev->dev, ret,
-				     "failed to set led PWM value for %s: %d",
-				     cdev->name, ret);
+				     "failed to set led PWM value for %s\n",
+				     cdev->name);
 
 	platform_set_drvdata(pdev, priv);
 	return 0;
-- 
2.34.1


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

* Re: [PATCH] leds: pwm-multicolor: Simplify an error message
  2023-04-15 16:27 [PATCH] leds: pwm-multicolor: Simplify an error message Christophe JAILLET
@ 2023-04-20 11:32 ` Lee Jones
  0 siblings, 0 replies; 2+ messages in thread
From: Lee Jones @ 2023-04-20 11:32 UTC (permalink / raw)
  To: Christophe JAILLET
  Cc: Pavel Machek, linux-kernel, kernel-janitors, linux-leds

On Sat, 15 Apr 2023, Christophe JAILLET wrote:

> dev_err_probe() already display the error code. There is no need to
> duplicate it explicitly in the error message.
> 
> While at it, add a missing \n at the end of the message.
> 
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
>  drivers/leds/rgb/leds-pwm-multicolor.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Applied, thanks

-- 
Lee Jones [李琼斯]

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

end of thread, other threads:[~2023-04-20 11:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-15 16:27 [PATCH] leds: pwm-multicolor: Simplify an error message Christophe JAILLET
2023-04-20 11:32 ` Lee Jones

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