aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pwm/pwm-loongson.c
diff options
context:
space:
mode:
authorDan Carpenter <[email protected]>2025-04-09 11:00:20 +0000
committerUwe Kleine-König <[email protected]>2025-04-17 09:51:29 +0000
commitbd897149e40cb5c95f3d8546108035d1ea167db5 (patch)
treea9e1e0eaa72a2a9c3beecb942cd5c70c142e718d /drivers/pwm/pwm-loongson.c
parentpwm: loongson: Fix u32 overflow in waveform calculation (diff)
downloadkernel-bd897149e40cb5c95f3d8546108035d1ea167db5.tar.gz
kernel-bd897149e40cb5c95f3d8546108035d1ea167db5.zip
pwm: loongson: Fix an error code in probe()
There is a copy and paste bug so we accidentally returned PTR_ERR(ddata->clk) instead of "ret". Fixes: 2b62c89448dd ("pwm: Add Loongson PWM controller support") Signed-off-by: Dan Carpenter <[email protected]> Reviewed-by: Binbin Zhou <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Uwe Kleine-König <[email protected]>
Diffstat (limited to 'drivers/pwm/pwm-loongson.c')
-rw-r--r--drivers/pwm/pwm-loongson.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pwm/pwm-loongson.c b/drivers/pwm/pwm-loongson.c
index 6392c4e34136..1ba16168cbb4 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);