Skip to content

Commit 9308e6a

Browse files
gugulotmichalsimek
authored andcommitted
phy: xilinx-xhdmiphy: Disable dru_clk in error path
Fix incorrect error path in clock parsing. These warnings are reported by smatch tool. warnings: drivers/phy/xilinx/xhdmiphy.c:755 xhdmiphy_clk_init() warn: 'priv->axi_lite_clk' from clk_prepare_enable() not released on lines: 737. drivers/phy/xilinx/xhdmiphy.c:755 xhdmiphy_clk_init() warn: 'priv->dru_clk' from clk_prepare_enable() not released on lines: 737. drivers/phy/xilinx/xhdmiphy.c:755 xhdmiphy_clk_init() warn: 'priv->tmds_clk' from clk_prepare_enable() not released on lines: 737. Signed-off-by: Rajesh Gugulothu <rajesh.gugulothu@amd.com> Reviewed-by: Vishal Sagar <vishal.sagar@amd.com>
1 parent b384377 commit 9308e6a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

‎drivers/phy/xilinx/xhdmiphy.c‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -734,7 +734,7 @@ static int xhdmiphy_clk_init(struct xhdmiphy_dev *priv)
734734
if (err) {
735735
dev_err(priv->dev,
736736
"Cannot set rate : %d\n", err);
737-
return err;
737+
goto err_disable_dru_clk;
738738
}
739739
dru_clk_rate = clk_get_rate(priv->dru_clk);
740740
dev_dbg(priv->dev,
@@ -747,6 +747,8 @@ static int xhdmiphy_clk_init(struct xhdmiphy_dev *priv)
747747

748748
return 0;
749749

750+
err_disable_dru_clk:
751+
clk_disable_unprepare(priv->dru_clk);
750752
err_disable_tmds_clk:
751753
clk_disable_unprepare(priv->tmds_clk);
752754
err_disable_axiclk:

0 commit comments

Comments
 (0)