diff options
| author | Dan Carpenter <[email protected]> | 2025-04-09 11:00:20 +0000 |
|---|---|---|
| committer | Uwe Kleine-König <[email protected]> | 2025-04-17 09:51:29 +0000 |
| commit | bd897149e40cb5c95f3d8546108035d1ea167db5 (patch) | |
| tree | a9e1e0eaa72a2a9c3beecb942cd5c70c142e718d /drivers/pwm/pwm-loongson.c | |
| parent | pwm: loongson: Fix u32 overflow in waveform calculation (diff) | |
| download | kernel-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.c | 2 |
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); |
