mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 11:50:43 +09:00
UPSTREAM: drm/rockchip: cdn-dp: Fix error handling
It is likely that both 'clk_disable_unprepare()' should be called if 'pm_runtime_get_sync()' fails. Add a new label for that, because 'err_set_rate' is not meaningful in this case. Add a missing call to 'pm_runtime_put()'. Fixes:1a0f7ed3ab("drm/rockchip: cdn-dp: add cdn DP support for rk3399") Change-Id: I30bae900a98fe7159728043aa9321d7d5f9573ec Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Acked-by: Mark Yao <mark.yao@rock-chips.com> Signed-off-by: Sean Paul <seanpaul@chromium.org> Link: http://patchwork.freedesktop.org/patch/msgid/20170220070815.23096-1-christophe.jaillet@wanadoo.fr Signed-off-by: Tao Huang <huangtao@rock-chips.com> (cherry picked from commitefe0220fc2)
This commit is contained in:
committed by
Tao Huang
parent
f695580c2d
commit
36381d5c7b
@@ -111,7 +111,7 @@ static int cdn_dp_clk_enable(struct cdn_dp_device *dp)
|
||||
ret = pm_runtime_get_sync(dp->dev);
|
||||
if (ret < 0) {
|
||||
DRM_DEV_ERROR(dp->dev, "cannot get pm runtime %d\n", ret);
|
||||
goto err_pclk;
|
||||
goto err_pm_runtime_get;
|
||||
}
|
||||
|
||||
reset_control_assert(dp->core_rst);
|
||||
@@ -133,6 +133,8 @@ static int cdn_dp_clk_enable(struct cdn_dp_device *dp)
|
||||
return 0;
|
||||
|
||||
err_set_rate:
|
||||
pm_runtime_put(dp->dev);
|
||||
err_pm_runtime_get:
|
||||
clk_disable_unprepare(dp->core_clk);
|
||||
err_core_clk:
|
||||
clk_disable_unprepare(dp->pclk);
|
||||
|
||||
Reference in New Issue
Block a user