mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-11-30 15:53:22 -05:00
clk: si5341: Fix clock HW provider cleanup
commit 49a8f2bc8d88702783c7e163ec84374e9a022f71 upstream.
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: 3044a860fd ("clk: Add Si5341/Si5340 driver")
Signed-off-by: Robert Hancock <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Stephen Boyd <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
7a831993a9
commit
2612e35676
1 changed files with 1 additions and 1 deletions
|
|
@ -1303,7 +1303,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");
|
||||
|
|
|
|||
Loading…
Reference in a new issue