Commit 3694c5c3 authored by Wei Yongjun's avatar Wei Yongjun Committed by Sean Paul

drm/rockchip: analogix_dp: add missing clk_disable_unprepare() on error

Add the missing clk_disable_unprepare() before return in the
error handling case.
Signed-off-by: default avatarWei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: default avatarSean Paul <seanpaul@chromium.org>
parent 69425599
...@@ -96,6 +96,7 @@ static int rockchip_dp_poweron(struct analogix_dp_plat_data *plat_data) ...@@ -96,6 +96,7 @@ static int rockchip_dp_poweron(struct analogix_dp_plat_data *plat_data)
ret = rockchip_dp_pre_init(dp); ret = rockchip_dp_pre_init(dp);
if (ret < 0) { if (ret < 0) {
dev_err(dp->dev, "failed to dp pre init %d\n", ret); dev_err(dp->dev, "failed to dp pre init %d\n", ret);
clk_disable_unprepare(dp->pclk);
return ret; return ret;
} }
...@@ -272,6 +273,7 @@ static int rockchip_dp_init(struct rockchip_dp_device *dp) ...@@ -272,6 +273,7 @@ static int rockchip_dp_init(struct rockchip_dp_device *dp)
ret = rockchip_dp_pre_init(dp); ret = rockchip_dp_pre_init(dp);
if (ret < 0) { if (ret < 0) {
dev_err(dp->dev, "failed to pre init %d\n", ret); dev_err(dp->dev, "failed to pre init %d\n", ret);
clk_disable_unprepare(dp->pclk);
return ret; return ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment