From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Aleksandr Aprelkov <aaprelkov@usergate.com>
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 16:40:10 +0200 [thread overview]
Message-ID: <7e4cd838-c5d8-4b5d-9e7c-b158db8a7484@linaro.org> (raw)
In-Reply-To: <20240401103808.617463-1-aaprelkov@usergate.com>
On 01/04/2024 12:38, Aleksandr Aprelkov wrote:
> There is no check if error occurs in clock provider registration.
No, instead explain why there should be a check.
>
> 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);
> + if (ret < 0)
> + goto err_reg;
I really do not understand why you are doing this. This SVACE in the
past was creating really fake reports and we were complaining multiple
times that you should fix your tool.
NAK for such explanation.
Best regards,
Krzysztof
prev parent reply other threads:[~2024-04-01 14:40 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
2024-04-01 14:40 ` Krzysztof Kozlowski [this message]
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=7e4cd838-c5d8-4b5d-9e7c-b158db8a7484@linaro.org \
--to=krzysztof.kozlowski@linaro.org \
--cc=aaprelkov@usergate.com \
--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