From: sashiko-bot@kernel.org
To: "Christian Marangi" <ansuelsmth@gmail.com>, linux-clk@vger.kernel.org
Subject: Re: [PATCH v7 1/2] clk: en7523: convert to full clk_hw implementation for en7581
Date: Fri, 20 Nov 2026 23:07:29 +0000 [thread overview]
Message-ID: <sashiko-outbox-226333@kernel.org> (raw)
In-Reply-To: <20261120225916.158641-2-ansuelsmth@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] clk: en7523: unchecked en7523_register_pcie_clk() in
en7581_register_clocks()
--
commit ac94f30014f62a41145dc175cf9bba75f5f392bc
Author: Christian Marangi <ansuelsmth@gmail.com>
clk: en7523: convert to full clk_hw implementation for en7581
This commit converts the EN7581 base clocks from fixed-rate clocks to a
clk_hw implementation with dedicated clk_ops, and updates
en7581_register_clocks() to propagate allocation and registration errors.
> diff --git a/drivers/clk/clk-en7523.c b/drivers/clk/clk-en7523.c
> index b38d7b5dc0ac0..8c00646ecdc6a 100644
> --- a/drivers/clk/clk-en7523.c
> +++ b/drivers/clk/clk-en7523.c
[ ... ]
> @@ -741,46 +747,76 @@ static int en7523_clk_hw_init(struct platform_device *pdev,
[ ... ]
> +static int en7581_register_clocks(struct device *dev, struct clk_hw_onecell_data *clk_data,
> + struct regmap *map, void __iomem *base)
> {
> struct clk_hw *hw;
> - u32 rate;
> int i;
>
> for (i = 0; i < ARRAY_SIZE(en7581_base_clks); i++) {
[ ... ]
> - clk_data->hws[desc->id] = hw;
> + clk_data->hws[desc->id] = &en_clk->hw;
> }
>
> hw = en7523_register_pcie_clk(dev, base);
> clk_data->hws[EN7523_CLK_PCIE] = hw;
> +
> + return 0;
> }
[Severity: Medium]
Should en7581_register_clocks() also check the return value of
en7523_register_pcie_clk()?
en7523_register_pcie_clk() returns NULL if devm_kzalloc_obj() or
clk_hw_register() fails. Without a check here, en7581_register_clocks()
stores NULL in clk_data->hws[EN7523_CLK_PCIE] and returns 0, allowing
probe to succeed with a dummy NULL clock entry instead of propagating the
registration failure.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261120225916.158641-1-ansuelsmth@gmail.com?part=1
next prev parent reply other threads:[~2026-11-20 23:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-20 22:59 [PATCH v7 0/2] clk: en7523: full clk_hw + set_rate for en7581 Christian Marangi
2026-11-20 22:59 ` [PATCH v7 1/2] clk: en7523: convert to full clk_hw implementation " Christian Marangi
2026-11-20 23:07 ` sashiko-bot [this message]
2026-11-20 22:59 ` [PATCH v7 2/2] clk: en7523: add support for .set_rate " Christian Marangi
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=sashiko-outbox-226333@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=ansuelsmth@gmail.com \
--cc=linux-clk@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.