Skip to content

Commit 9bd43a6

Browse files
mripardbebarino
authored andcommitted
clk: bcm: rpi: Make sure the clkdev lookup is removed
The clkdev lookup created for the cpufreq device is never removed if there's an issue later in probe or at module removal time. Let's convert to the managed variant of the clk_hw_register_clkdev function to make sure it happens. Cc: Michael Turquette <[email protected]> Cc: [email protected] Acked-by: Nicolas Saenz Julienne <[email protected]> Reviewed-by: Stephen Boyd <[email protected]> Tested-by: Nicolas Saenz Julienne <[email protected]> Signed-off-by: Maxime Ripard <[email protected]> Link: https://lore.kernel.org/r/075e2c6d315eccdaf8fb72b320712b86e6c25b22.1592210452.git-series.maxime@cerno.tech Signed-off-by: Stephen Boyd <[email protected]>
1 parent 55ee6a9 commit 9bd43a6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

drivers/clk/bcm/clk-raspberrypi.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,8 +245,9 @@ static int raspberrypi_register_pllb_arm(struct raspberrypi_clk *rpi)
245245
return ret;
246246
}
247247

248-
ret = clk_hw_register_clkdev(&raspberrypi_clk_pllb_arm.hw,
249-
NULL, "cpu0");
248+
ret = devm_clk_hw_register_clkdev(rpi->dev,
249+
&raspberrypi_clk_pllb_arm.hw,
250+
NULL, "cpu0");
250251
if (ret) {
251252
dev_err(rpi->dev, "Failed to initialize clkdev\n");
252253
return ret;

0 commit comments

Comments
 (0)