From: sashiko-bot@kernel.org
To: "Triet Hoang" <triet.hoang.dev@gmail.com>
Cc: linux-clk@vger.kernel.org
Subject: Re: [PATCH] clk: raspberrypi: Handle cpufreq device registration failure
Date: Fri, 18 Sep 2026 04:48:57 +0000 [thread overview]
Message-ID: <20260918044857.F202E1F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260918044131.608482-1-triet.hoang.dev@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] clk: raspberrypi: core clock probe fails if optional cpufreq device fails
--
commit 9a3a7cc11a038dd3ae191483f044c2febc6c2ed1
Author: Triet Hoang <triet.hoang.dev@gmail.com>
clk: raspberrypi: Handle cpufreq device registration failure
This commit adds an error check when registering the raspberrypi-cpufreq
device in the clock driver probe function. It propagates the error if the
cpufreq device fails to register, preventing a successful probe return.
> diff --git a/drivers/clk/bcm/clk-raspberrypi.c b/drivers/clk/bcm/clk-raspberrypi.c
> index f1a99de6de4f1..9882f243d6813 100644
> --- a/drivers/clk/bcm/clk-raspberrypi.c
> +++ b/drivers/clk/bcm/clk-raspberrypi.c
> @@ -553,6 +553,8 @@ static int raspberrypi_clk_probe(struct platform_device *pdev)
>
> rpi->cpufreq = platform_device_register_data(dev, "raspberrypi-cpufreq",
> -1, NULL, 0);
> + if (IS_ERR(rpi->cpufreq))
> + return PTR_ERR(rpi->cpufreq);
[Severity: Medium]
Does this introduce a regression where fundamental core clocks might be
unregistered if the optional cpufreq device fails?
The raspberrypi-clk driver provides essential system clocks, such as arm,
core, and pixel. By returning an error from raspberrypi_clk_probe(), devres
will automatically unregister these clocks. This can prevent other fundamental
SoC devices that depend on these clocks from probing, which could severely
degrade the system or prevent it from booting entirely.
Is it safe to structurally tie the survival of the core clocks to an optional
dynamic frequency scaling child device?
>
> return 0;
> }
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260918044131.608482-1-triet.hoang.dev@gmail.com?part=1
next prev parent reply other threads:[~2026-09-18 4:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-18 4:41 [PATCH] clk: raspberrypi: Handle cpufreq device registration failure Triet Hoang
2026-09-18 4:48 ` sashiko-bot [this message]
2026-09-18 13:33 ` Stefan Wahren
2026-09-18 22:10 ` Brian Masney
2026-09-18 22:12 ` Brian Masney
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=20260918044857.F202E1F000FF@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=linux-clk@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=triet.hoang.dev@gmail.com \
/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