phy: phy-rockchip-inno-usb2: simplify phy clock handling
authorSebastian Reichel <sebastian.reichel@collabora.com>
Mon, 22 May 2023 17:03:22 +0000 (19:03 +0200)
committerVinod Koul <vkoul@kernel.org>
Wed, 12 Jul 2023 16:57:41 +0000 (22:27 +0530)
commitb43511233c6e34b9c0d9a55e41b078d10e7d9ea6
tree624bec2f12ec763d23945a0fdd14c243e15a51ae
parent5ae6224bb1cd948dad751016d1dfc4196e628eeb
phy: phy-rockchip-inno-usb2: simplify phy clock handling

Simplify phyclk handling by using devm_clk_get_optional_enabled to
acquire and enable the optional clock. This also fixes a resource
leak in driver remove path and adds proper error handling.

Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Link: https://lore.kernel.org/r/20230522170324.61349-6-sebastian.reichel@collabora.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/phy/rockchip/phy-rockchip-inno-usb2.c