]> git.baikalelectronics.ru Git - kernel.git/commit
clk: si5341: Fix clock HW provider cleanup
authorRobert Hancock <robert.hancock@calian.com>
Wed, 12 Jan 2022 20:38:16 +0000 (14:38 -0600)
committerStephen Boyd <sboyd@kernel.org>
Thu, 13 Jan 2022 21:20:54 +0000 (13:20 -0800)
commit8454c1c6fd28477cb2b044175273145c4fe9d6b9
tree22d34841f83737f4f4e12a2ad8e1a30fb1846134
parentdd1975ca3583fd3db0f3d5b66ec802d7fc0931a1
clk: si5341: Fix clock HW provider cleanup

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: efc8b8846dfb ("clk: Add Si5341/Si5340 driver")
Signed-off-by: Robert Hancock <robert.hancock@calian.com>
Link: https://lore.kernel.org/r/20220112203816.1784610-1-robert.hancock@calian.com
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
drivers/clk/clk-si5341.c