The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Binbin Zhou <zhoubinbin@loongson.cn>
To: Dan Carpenter <dan.carpenter@linaro.org>
Cc: "Uwe Kleine-König" <ukleinek@kernel.org>,
	"Huacai Chen" <chenhuacai@kernel.org>,
	"Juxin Gao" <gaojuxin@loongson.cn>,
	linux-pwm@vger.kernel.org, linux-kernel@vger.kernel.org,
	kernel-janitors@vger.kernel.org
Subject: Re: [PATCH next] pwm: loongson: Fix an error code in probe()
Date: Tue, 15 Apr 2025 20:16:20 +0800	[thread overview]
Message-ID: <5bf96932-330c-483c-9a09-e84b73cd14ca@loongson.cn> (raw)
In-Reply-To: <6965a480-745c-426f-b17b-e96af532578f@stanley.mountain>

Hi Dan:

Sorry for my late reply and thanks for fixing my cheap mistake.

On 2025/4/9 19:00, Dan Carpenter wrote:
> 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>
Reviewed-by: Binbin Zhou <zhoubinbin@loongson.cn>
> ---
>   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);
Thanks.
Binbin


  reply	other threads:[~2025-04-15 12:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-09 11:00 [PATCH next] pwm: loongson: Fix an error code in probe() Dan Carpenter
2025-04-15 12:16 ` Binbin Zhou [this message]
2025-04-16  5:24 ` Uwe Kleine-König

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=5bf96932-330c-483c-9a09-e84b73cd14ca@loongson.cn \
    --to=zhoubinbin@loongson.cn \
    --cc=chenhuacai@kernel.org \
    --cc=dan.carpenter@linaro.org \
    --cc=gaojuxin@loongson.cn \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pwm@vger.kernel.org \
    --cc=ukleinek@kernel.org \
    /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