Message ID | 20221120071330.31154-1-guozihua@huawei.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | phy: rockchip: Fix resource leakage in inno_dsidphy_power_on | expand |
diff --git a/drivers/phy/rockchip/phy-rockchip-inno-dsidphy.c b/drivers/phy/rockchip/phy-rockchip-inno-dsidphy.c index 2c5847faff63..20ba716f5dd0 100644 --- a/drivers/phy/rockchip/phy-rockchip-inno-dsidphy.c +++ b/drivers/phy/rockchip/phy-rockchip-inno-dsidphy.c @@ -604,6 +604,9 @@ static int inno_dsidphy_power_on(struct phy *phy) inno_dsidphy_lvds_mode_enable(inno); break; default: + pm_runtime_put_sync(inno->dev); + clk_disable_unprepare(inno->ref_clk); + clk_disable_unprepare(inno->pclk_phy); return -EINVAL; }
inno->pclk_phy and inno->ref_clk is not unprepared in error path. pm_runtime should also be put. This patch fix these issues. This resolves smatch warning: inno_dsidphy_power_on() warn: 'inno->pclk_phy' from clk_prepare_enable() not released on lines: 607. Fixes: b7535a3bc0ba ("phy/rockchip: Add support for Innosilicon MIPI/LVDS/TTL PHY") Fixes: f0684c1a8367 ("phy/rockchip: inno-dsidphy: generalize parameter handling") Signed-off-by: GUO Zihua <guozihua@huawei.com> --- drivers/phy/rockchip/phy-rockchip-inno-dsidphy.c | 3 +++ 1 file changed, 3 insertions(+)