Thread (4 messages) 4 messages, 3 authors, 10d ago

Re: [PATCH] clk: raspberrypi: Handle cpufreq device registration failure

From: Stefan Wahren <wahrenst@gmx.net>
Date: 2026-09-18 13:34:15
Also in: linux-clk, lkml

Hi Triet,

nice catch.

Am 18.09.26 um 06:41 schrieb Triet Hoang:
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 <redacted>
Reviewed-by: Stefan Wahren <wahrenst@gmx.net>

Could you please add a Fixes tag?
Also it would be nice, if you can send a patch which also fixes 
drivers/firmware/raspberrypi.c

Thanks
quoted hunk ↗ jump to hunk
---
  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;
  }
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help