The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH next] pwm: loongson: Fix an error code in probe()
@ 2025-04-09 11:00 Dan Carpenter
  2025-04-15 12:16 ` Binbin Zhou
  2025-04-16  5:24 ` Uwe Kleine-König
  0 siblings, 2 replies; 3+ messages in thread
From: Dan Carpenter @ 2025-04-09 11:00 UTC (permalink / raw)
  To: Binbin Zhou
  Cc: Uwe Kleine-König, Huacai Chen, Juxin Gao, linux-pwm,
	linux-kernel, kernel-janitors

There is a copy and paste bug so we accidentally returned
PTR_ERR(ddata->clk) instead of "ret".

Fixes: 322fc380cea1 ("pwm: Add Loongson PWM controller support")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
 drivers/pwm/pwm-loongson.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pwm/pwm-loongson.c b/drivers/pwm/pwm-loongson.c
index 412c67739ef9..e31afb11ddd7 100644
--- a/drivers/pwm/pwm-loongson.c
+++ b/drivers/pwm/pwm-loongson.c
@@ -211,7 +211,7 @@ static int pwm_loongson_probe(struct platform_device *pdev)
 	if (ddata->clk) {
 		ret = devm_clk_rate_exclusive_get(dev, ddata->clk);
 		if (ret)
-			return dev_err_probe(dev, PTR_ERR(ddata->clk),
+			return dev_err_probe(dev, ret,
 					     "Failed to get exclusive rate\n");
 
 		ddata->clk_rate = clk_get_rate(ddata->clk);
-- 
2.47.2


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

end of thread, other threads:[~2025-04-16  5:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-09 11:00 [PATCH next] pwm: loongson: Fix an error code in probe() Dan Carpenter
2025-04-15 12:16 ` Binbin Zhou
2025-04-16  5:24 ` Uwe Kleine-König

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox