* [PATCH] clk: si5341: Fix clock HW provider cleanup
@ 2022-01-12 20:38 Robert Hancock
2022-01-13 21:20 ` Stephen Boyd
0 siblings, 1 reply; 2+ messages in thread
From: Robert Hancock @ 2022-01-12 20:38 UTC (permalink / raw)
To: linux-clk; +Cc: mturquette, sboyd, mike.looijmans, Robert Hancock
The call to of_clk_add_hw_provider was not undone on remove or on probe
failure, which could cause an oops on a subsequent attempt to retrieve
clocks for the removed device. Switch to the devm version of the
function to avoid this issue.
Fixes: 3044a860fd09 ("clk: Add Si5341/Si5340 driver")
Signed-off-by: Robert Hancock <robert.hancock@calian.com>
---
drivers/clk/clk-si5341.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/clk/clk-si5341.c b/drivers/clk/clk-si5341.c
index 57ae183982d8..f7b41366666e 100644
--- a/drivers/clk/clk-si5341.c
+++ b/drivers/clk/clk-si5341.c
@@ -1740,7 +1740,7 @@ static int si5341_probe(struct i2c_client *client,
clk_prepare(data->clk[i].hw.clk);
}
- err = of_clk_add_hw_provider(client->dev.of_node, of_clk_si5341_get,
+ err = devm_of_clk_add_hw_provider(&client->dev, of_clk_si5341_get,
data);
if (err) {
dev_err(&client->dev, "unable to add clk provider\n");
--
2.31.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] clk: si5341: Fix clock HW provider cleanup
2022-01-12 20:38 [PATCH] clk: si5341: Fix clock HW provider cleanup Robert Hancock
@ 2022-01-13 21:20 ` Stephen Boyd
0 siblings, 0 replies; 2+ messages in thread
From: Stephen Boyd @ 2022-01-13 21:20 UTC (permalink / raw)
To: Robert Hancock, linux-clk; +Cc: mturquette, mike.looijmans, Robert Hancock
Quoting Robert Hancock (2022-01-12 12:38:16)
> The call to of_clk_add_hw_provider was not undone on remove or on probe
> failure, which could cause an oops on a subsequent attempt to retrieve
> clocks for the removed device. Switch to the devm version of the
> function to avoid this issue.
>
> Fixes: 3044a860fd09 ("clk: Add Si5341/Si5340 driver")
> Signed-off-by: Robert Hancock <robert.hancock@calian.com>
> ---
Applied to clk-next
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-01-13 21:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-12 20:38 [PATCH] clk: si5341: Fix clock HW provider cleanup Robert Hancock
2022-01-13 21:20 ` Stephen Boyd
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.