]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
wifi: wilc1000: Convert using devm_clk_get_optional_enabled() in wilc_sdio_probe()
authorLi Zetao <lizetao1@huawei.com>
Tue, 3 Sep 2024 11:02:04 +0000 (19:02 +0800)
committerKalle Valo <kvalo@kernel.org>
Mon, 9 Sep 2024 12:30:04 +0000 (15:30 +0300)
commit554475248177894513bbb495de577836e67a57c0
tree30b21b8b725e3db87a1b3254e5be9dcd982822d8
parent6d7c6ae1efb1ff68bc01d79d94fdf0388f86cdd8
wifi: wilc1000: Convert using devm_clk_get_optional_enabled() in wilc_sdio_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, drop
the clk_disable_unprepare label, and the original error process can change
to dispose_irq.

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