Linux clock framework development
 help / color / mirror / Atom feed
From: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
To: Aleksandr Aprelkov <aaprelkov@usergate.com>,
	Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Cc: Michael Turquette <mturquette@baylibre.com>,
	Stephen Boyd <sboyd@kernel.org>,
	linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org,
	linux-clk@vger.kernel.org, lvc-project@linuxtesting.org
Subject: Re: [PATCH] clk: s2mps11: Check of_clk_add_hw_provider() result
Date: Mon, 1 Apr 2024 14:06:14 +0200	[thread overview]
Message-ID: <ba5a9935-fb62-495e-8b52-bdb6a6d64f84@wanadoo.fr> (raw)
In-Reply-To: <20240401103808.617463-1-aaprelkov@usergate.com>

Le 01/04/2024 à 12:38, Aleksandr Aprelkov a écrit :
> There is no check if error occurs in clock provider registration.
> 
> Found by Linux Verification Center (linuxtesting.org) with SVACE.
> 
> Fixes: b228fad50c00 ("clk: s2mps11: Migrate to clk_hw based OF and registration APIs")
> Signed-off-by: Aleksandr Aprelkov <aaprelkov@usergate.com>
> ---
>   drivers/clk/clk-s2mps11.c | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/clk/clk-s2mps11.c b/drivers/clk/clk-s2mps11.c
> index 38c456540d1b..f9ce413b6c02 100644
> --- a/drivers/clk/clk-s2mps11.c
> +++ b/drivers/clk/clk-s2mps11.c
> @@ -187,8 +187,10 @@ static int s2mps11_clk_probe(struct platform_device *pdev)
>   	}
>   
>   	clk_data->num = S2MPS11_CLKS_NUM;
> -	of_clk_add_hw_provider(s2mps11_clks->clk_np, of_clk_hw_onecell_get,
> +	ret = of_clk_add_hw_provider(s2mps11_clks->clk_np, of_clk_hw_onecell_get,
>   			       clk_data);

Hi,

Nit: "clk_data);" is wrongly aligned now.

CJ

> +	if (ret < 0)
> +		goto err_reg;
>   
>   	platform_set_drvdata(pdev, s2mps11_clks);
>   


  reply	other threads:[~2024-04-01 12:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-01 10:38 [PATCH] clk: s2mps11: Check of_clk_add_hw_provider() result Aleksandr Aprelkov
2024-04-01 12:06 ` Christophe JAILLET [this message]
2024-04-01 14:40 ` Krzysztof Kozlowski

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=ba5a9935-fb62-495e-8b52-bdb6a6d64f84@wanadoo.fr \
    --to=christophe.jaillet@wanadoo.fr \
    --cc=aaprelkov@usergate.com \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=lvc-project@linuxtesting.org \
    --cc=mturquette@baylibre.com \
    --cc=sboyd@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