From: Kuan-Wei Chiu <visitorckw@gmail.com>
To: Sean Anderson <sean.anderson@seco.com>
Cc: lukma@denx.de, trini@konsulko.com, andrew.goodbody@linaro.org,
aford173@gmail.com, jserv@ccns.ncku.edu.tw, eleanor15x@gmail.com,
u-boot@lists.denx.de
Subject: Re: [PATCH] clk: versaclock: Fix incorrect error check in versaclock_probe()
Date: Tue, 7 Apr 2026 18:43:37 +0800 [thread overview]
Message-ID: <adTf2W5YY3oz-Fro@google.com> (raw)
In-Reply-To: <6b40a19c-3fe6-40ef-abd8-66939eb0dfae@seco.com>
On Fri, Dec 12, 2025 at 01:40:39PM -0500, Sean Anderson wrote:
> On 12/12/25 13:06, Kuan-Wei Chiu wrote:
> > The error check during the registration of FODs is incorrect. The code
> > currently checks IS_ERR(pll_name) immediately after assigning
> > fod_name[n].
> >
> > Since pll_name is checked in a previous block, this condition will
> > always be false, causing any allocation failure in
> > versaclock_get_name() for fod_name to be ignored. This could lead
> > to usage of an invalid pointer.
> >
> > Fix the condition to check fod_name[n] instead.
> >
> > Fixes: dcf2cee77f2d ("clk: clk_versaclock: Add support for versaclock driver")
> > Signed-off-by: Kuan-Wei Chiu <visitorckw@gmail.com>
> > ---
> > drivers/clk/clk_versaclock.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/clk/clk_versaclock.c b/drivers/clk/clk_versaclock.c
> > index 19a787eaf0c..1dbde75f180 100644
> > --- a/drivers/clk/clk_versaclock.c
> > +++ b/drivers/clk/clk_versaclock.c
> > @@ -945,7 +945,7 @@ int versaclock_probe(struct udevice *dev)
> > /* Register FODs */
> > for (n = 0; n < vc5->chip_info->clk_fod_cnt; n++) {
> > fod_name[n] = versaclock_get_name(dev->name, "fod", n);
> > - if (IS_ERR(pll_name)) {
> > + if (IS_ERR(fod_name[n])) {
> > ret = PTR_ERR(fod_name[n]);
> > goto free_fod;
> > }
>
> Reviewed-by: Sean Anderson <sean.anderson@seco.com>
>
Thanks for the review!
Just a gentle ping on this patch from last December.
It looks like it might have slipped through the cracks.
Regards,
Kuan-Wei
prev parent reply other threads:[~2026-04-07 10:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-12 18:06 [PATCH] clk: versaclock: Fix incorrect error check in versaclock_probe() Kuan-Wei Chiu
2025-12-12 18:40 ` Sean Anderson
2026-04-07 10:43 ` Kuan-Wei Chiu [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=adTf2W5YY3oz-Fro@google.com \
--to=visitorckw@gmail.com \
--cc=aford173@gmail.com \
--cc=andrew.goodbody@linaro.org \
--cc=eleanor15x@gmail.com \
--cc=jserv@ccns.ncku.edu.tw \
--cc=lukma@denx.de \
--cc=sean.anderson@seco.com \
--cc=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
/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.