]> git.ipfire.org Git - thirdparty/linux.git/commit
wifi: wilc1000: Convert using devm_clk_get_optional_enabled() in wilc_bus_probe()
authorLi Zetao <lizetao1@huawei.com>
Tue, 3 Sep 2024 11:02:05 +0000 (19:02 +0800)
committerKalle Valo <kvalo@kernel.org>
Mon, 9 Sep 2024 12:30:04 +0000 (15:30 +0300)
commitff63a5c727821bd1069a384695bb4557eaddb1a1
tree59454bbc15349e089ab0be398f13471215b7df5b
parent554475248177894513bbb495de577836e67a57c0
wifi: wilc1000: Convert using devm_clk_get_optional_enabled() in wilc_bus_probe()

Use devm_clk_get_optional_enabled() instead of devm_clk_get_optional() +
clk_prepare_enable(), which can make the clk consistent with the device
life cycle and reduce the risk of unreleased clk resources. Since the
device framework has automatically released the clk resource, there is
no need to execute clk_disable_unprepare(clk) on the error path.

Signed-off-by: Li Zetao <lizetao1@huawei.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://patch.msgid.link/20240903110205.4127706-3-lizetao1@huawei.com
drivers/net/wireless/microchip/wilc1000/spi.c