From: Triet Hoang <triet.hoang.dev@gmail.com>
To: sboyd@kernel.org
Cc: bmasney+clk@redhat.com, jbrunet+clk@baylibre.com,
florian.fainelli@broadcom.com,
bcm-kernel-feedback-list@broadcom.com, mcanal@igalia.com,
wahrenst@gmx.net, triet.hoang.dev@gmail.com,
linux-clk@vger.kernel.org, linux-rpi-kernel@lists.infradead.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: [PATCH] clk: raspberrypi: Handle cpufreq device registration failure
Date: Fri, 18 Sep 2026 11:41:30 +0700 [thread overview]
Message-ID: <20260918044131.608482-1-triet.hoang.dev@gmail.com> (raw)
Check the return value of platform_device_register_data() when
registering the raspberrypi-cpufreq device and propagate the error
if registration fails.
This prevents the clock driver from reporting a successful probe
when the cpufreq device could not be registered.
Signed-off-by: Triet Hoang <triet.hoang.dev@gmail.com>
---
drivers/clk/bcm/clk-raspberrypi.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/clk/bcm/clk-raspberrypi.c b/drivers/clk/bcm/clk-raspberrypi.c
index f1a99de6de4f..9882f243d681 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);
return 0;
}
--
2.53.0
next reply other threads:[~2026-09-18 4:42 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-18 4:41 Triet Hoang [this message]
2026-09-18 4:48 ` [PATCH] clk: raspberrypi: Handle cpufreq device registration failure sashiko-bot
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=20260918044131.608482-1-triet.hoang.dev@gmail.com \
--to=triet.hoang.dev@gmail.com \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=bmasney+clk@redhat.com \
--cc=florian.fainelli@broadcom.com \
--cc=jbrunet+clk@baylibre.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rpi-kernel@lists.infradead.org \
--cc=mcanal@igalia.com \
--cc=sboyd@kernel.org \
--cc=wahrenst@gmx.net \
/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.